- This topic has 3 replies, 2 voices, and was last updated 19 years, 3 months ago by Riyad Kalla.
-
AuthorPosts
-
Island1956MemberHello,
I am trying to get Derby DB set up in a project and am having problems. I have downloaded and installed Derby and the IBM plugins required. Added the Derby nature to the project. Set up DERBY_INSTALL and CLASSPATH system variables. I can start and stop Derby within the IDE with the added nature. I am using Eclipse 3.0.2, MyEclipse 3.8.4, Derby 10.0.2.1, Java 1.5.3 and Tomcat 5.5.9. When I start the server and try to start Derby via Class.forName(“org.apache.derby.jdbc.EmbeddedDriver”); I get the following error. What am I missing?java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.jtb910.fmw.servlets.Log4jInit.init(Log4jInit.java:20)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:894)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:857)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)java org.apache.derby.tools.sysinfo -cp
returns:
Testing for presence of all Derby-related libraries; typically, only some are needed.
For a list of possible arguments, type java org.apache.derby.tools.sysinfo -c args
FOUND IN CLASS PATH:
Derby embedded engine library (derby.jar)
Derby tools library (derbytools.jar)NOT FOUND IN CLASS PATH:
Derby Network Server library (derbynet.jar)
(org.apache.derby.drda.NetworkServerControl not found.)
Derby Client libraries (db2jcc.jar)
(com.ibm.db2.jcc.DB2Driver not found.)
Riyad KallaMemberYou are most likely missing the derby driver from your common/lib directory of your Tomcat install, so when it tries to create an instance of the driver, it’s barfing.
Island1956MemberI am confused. I have added the nature which added the jar files to the project. I have also defined the environment variables so that java knows where they are (see java org.apache.derby.tools.sysinfo -cp results). Shouldn’t Tomcat be able to find derby.jar through either avenue?
Riyad KallaMemberI have added the nature which added the jar files to the project.
We do not ship a derby nature, so this is a separate plugin doing this. I don’t know how it functions.
Shouldn’t Tomcat be able to find derby.jar through either avenue?
I do not know, you can double check on the tomcat list if you’d really rather not copy the JARs into that dir.
-
AuthorPosts