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:
<nature>org.apache.derby.ui.derbyEngine</nature>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.apache.derby.ui.derbyEngine</nature>
</natures>
Then, just save the file. Problem solved.
Awesome man.
ReplyDeleteWorked like a charm.
My god I searched all over the web for a quick fix and this is is! ++ mate!
ReplyDeleteMan, you are a true jenius!
ReplyDeletecant believe you have such an elegant solution for this annoying problem, Thanks a bunch!!!!
when i tried to startup derby network the following error was occured.
ReplyDeleteError: Could not find or load main class org.apache.derby.drda.NetworkServerControl.What should i do now?
Add the Derby jar files (derby_home/lib) to projects build path
DeleteYo just genius buddy. Awesome. Man You rock!! Double thumbs up!!!
ReplyDeletepeople like you are an inspiration!
ReplyDelete