Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Eclipse WTP - Apache Derby
Eclipse WTP - Apache Derby [message #170078] Thu, 25 May 2006 06:23 Go to next message
Eclipse UserFriend
Originally posted by: dkarpowitz.yahoo.com

I'm trying to deploy a web service that connects to a Derby database using
Eclipse WTP. Running my code as a standalone app works fine. As soon as
I deploy it as a web service it can no longer find the database driver to
make a connection.

Here's my connection code from the service:

String dbUrl = System.getProperty("APDLdb.url",
"jdbc:derby:APDLdb");
String dbDriver System.getProperty("APDLdb.driver",
"org.apache.derby.jdbc.EmbeddedDriver");
String dbUser = System.getProperty("APDLdb.user", "apdl");
String dbPassword = System.getProperty("APDLdb.password", "apdl");
Connection conn = null;

try {
Class.forName(dbDriver).newInstance();
conn = DriverManager.getConnection(dbUrl, dbUser, dbPassword);

} catch (Exception e) {
e.printStackTrace();
}

Here's the error:

java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

Seems like it should be simple enough to fix...I've used the Derby plugin
to add the Derby jar's to the projects, but still no luck. Is there
something I'm missing on configuring a dynamic web project?

I am a newbie and have spent quite a bit of time trying to figure this one
out on my own...even bought the Pro Eclipse JST book...followed their
examples exactly without any luck either.

Thanks in advance.
Re: Eclipse WTP - Apache Derby [message #170085 is a reply to message #170078] Thu, 25 May 2006 06:27 Go to previous message
Eclipse UserFriend
Originally posted by: dkarpowitz.yahoo.com

Sorry here is the complete stack trace if that helps at all:

java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
at
org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.java:1352)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(Webap pClassLoader.java:1198)
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.apdl.services.InputService.getCustomerInput(InputService .java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCP rovider.java:388)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RP CProvider.java:283)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvi der.java:323)
at
org.apache.axis.strategies.InvocationStrategy.visit(Invocati onStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService .java:453)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281 )
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServle t.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisS ervletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru n(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Previous Topic:test
Next Topic:Think I found problem in J2EE Module Dependencies
Goto Forum:
  


Current Time: Sun Nov 23 04:50:26 GMT 2014

Powered by FUDForum. Page generated in 0.03955 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software