Tuesday, December 11, 2012

Fix: Add Apache Derby Nature in Eclipse does nothing

Tonight I had a strange issue with Eclipse: adding the Apache Derby nature to an Eclipse project wasn't working. Ordinarily, (provided that the Apache Derby Eclipse plugin is already installed) right-clicking a project and choosing Apache Derby->Add Apache Derby Nature to a project will do just that, enabling additional features such as starting or stopping the Derby network server.

This time, however, choosing that option appeared to do nothing. Rather than a menu full of commands, I was given only the option "Add Apache Derby Nature" in the Apache Derby context menu, which is what I had previously selected. I tried several times to add the nature in this manner, but to no avail.

The fix turned out to be simple. After grepping the directory of another project where I had successfully used Derby, I found that the change should have been reflected in my project's .project file.

The fix: if the Apache Derby nature isn't correctly added to a project through the Apache Derby menu, it can be done manually by editing the .project file (which is in the root directory the project). This is an XML file.

Find the <natures> node and add this line:


Here's how the entire <natures> node looks after the change in my project:


Then, just save the file. Problem solved.


  1. My god I searched all over the web for a quick fix and this is is! ++ mate!

  2. Man, you are a true jenius!
    cant believe you have such an elegant solution for this annoying problem, Thanks a bunch!!!!

  3. when i tried to startup derby network the following error was occured.
    Error: Could not find or load main class org.apache.derby.drda.NetworkServerControl.What should i do now?

    1. Add the Derby jar files (derby_home/lib) to projects build path

  4. Yo just genius buddy. Awesome. Man You rock!! Double thumbs up!!!

  5. people like you are an inspiration!