Archive for ‘Tutorials’

January 26, 2011

ClassNotFoundException: org.mortbay.start.Main

by Jay Jonas

I was trying to set up Eclipse to run and deploy my projects to a Jetty 7 server. I have downloaded it and unpacked it, and I  installed the Jetty plugin from the available server adapters list, but when I try to configure a new Jetty server, the server type list only contains “Jetty 6”. If I use this and point it at my server runtime, when I try to start it I get the following error:

java.lang.NoClassDefFoundError: org/mortbay/start/Main
Caused by: java.lang.ClassNotFoundException: org.mortbay.start.Main
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Exception in thread "main"

The problem is that the package name changed with the migration from Codehaus to Eclipse. So, we need a new WTP Adaptor for Jetty 7.x/Jetty 8.x that can be downloaded from the update sites as follows:

To install the WTP Adaptor, complete the following steps.

  1. Open Eclipse.
  2. In the taskbar at the top of your screen, click Help -> Install New Software. The Available Software dialog box opens.
  3. In the Work with: field, type one of the URLs provided above.
  4. Press Return.
  5. In the Name/Version box below, select the box for Jetty WTP Adaptor Site.
  6. Click Next.
  7. The Install Details dialog box opens.
  8. Click Next again.
  9. The Review Licenses dialog box opens.
  10. Accept the terms and click Finish.
  11. The Installing Software dialog box opens, displaying progress for installing the WTP adaptor. When it completes, the Software Updates dialog box opens with a message that you need to restart Eclipse to complete the installation.
  12. Click Restart Now.

Next step will be create a Jetty WTP Server.  Stay tuned as I will show it in the next post.

Tags: , ,
January 12, 2011

Tutorial: easy as 1-2-3 hard disk partition with Windows 7

by Jay Jonas

Then I’ll describe a quick and easy tutorial on how you can create a new partition splitting your C: drive.

First of all I recommend that you defragment your drive C:. Open the Start Menu and click on Computer. Now click the right mouse button on the hard drive C: and choose Properties from the context menu. Go to the Tools tab and click the button Defragment Now. In the Disk Defragmenter window, make sure that the Drive C: is selected and click the Analyze Disk. When finished scanning, click Disk Defragment. Grab a cup of coffee because this may take some time.

Back it’s time to perform the main task.

Again, go to the Start Menu click the right mouse button on the Computer option and then choose Manage. In the Computer Management window select Disk Management.

Click the right mouse button on the disk you want to partition and choose Shrink Volume.

In the window that opens enter the amount of space to shrink in MB.

Note that after confirming the previous operation, you will see the partition divided and shown as unallocated space.

In the final step, click on the unallocated space and choose New Simple Volume to open the wizard. Click Next. Select “Assign the following drive letter” to the letter you prefer. Choose the NTFS file system and choose  the  allocation unit size as default too.  If you’re in a hurry, check to perform a quick format. It is still possible, if you wish, to enable compression of files and folders selecting the right option. Click Finish.

In the Computer Manager find your new partition ready for use.

That’s it!