db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanley Bradbury <Stan.Bradb...@gmail.com>
Subject Re: Unable to integrate Derby with Tomcat
Date Tue, 05 Jul 2005 20:28:46 GMT
I agree with edson that this is a configuration problem (specifically: 
either the Driver class is not defined (null) or possibly the class-file 
containing the Driver class referenced by the JSP datasource is not in 
the CLASSPATH being used by the JSP / datasource). 

Datasource error indicationg classpath or driver class definition problems:
java.sql.SQLException: Cannot load JDBC driver class 'null'
at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)

How to resolve classpath problems depends on the version of Tomcat being 
used.  Here are references I use when working with Tomcat to help me 
sort out such issues.  If the driver is properly spcified in the JSP see 
the following information:

See the CLASSLOADER how-to for the version you are using at:
http://jakarta.apache.org/tomcat/faq/classnotfound.html

A general post I also find helpful is from:: 
http://marc.theaimsgroup.com/?l=tomcat-user&m=103843452413727&w=2 
<http://marc.theaimsgroup.com/?l=tomcat-user&m=103843452413727&w=2>
and states:

Class loaders are pretty much the wierdest thing about 
Java.  There are several issues that might be related 
to this.

* Tomcat's standard startup script totally ignore your 
CLASSPATH variable ..

* Putting JARs in the runtime extensions directory (under 
4.0   that means $JAVA_HOME/jre/lib/ext, for 4.1 that 
means $CATALINA_HOME/common/endorsed) can cause problems ...

* If the class you are talking about is in the common class 
loader (i.e. in common/lib) but the dependent class is 
in /WEB-INF/lib, you are guaranteed to get this error.

Hope this helps.





apoorv kulshrestha wrote:

> Hi,
>
> I am required to integrate Derby with Tomcat.
>
> I found and followed the following article:
> (http://www.ibm.com/developerworks/db2/library/techarticle/dm-0408bader/ 
> <http://www.ibm.com/developerworks/db2/library/techarticle/dm-0408bader/>)
>
> I have been following procedures stated under "Enterprise Scenario" 
> but it didn't work. Can somebody tell me how to accomplish this 
> integration?
>
> Any suggestions/help on how to run Derby with Tomcat (or JBoss?)
>
> Thanks in Advance,
> Apoorv
>
> ----------------------------------------------------------------------------------------------------------
> The sample jsp page in the article gave following error:
>
> java.sql.SQLException: Cannot load JDBC driver class 'null'
> at 
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
> at 
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
> at org.apache.jsp.HelloCloudscape_jsp._jspService 
> (HelloCloudscape_jsp.java:165)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServletWrapper.service 
> (JspServletWrapper.java:204)
> at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> at javax.servlet.http.HttpServlet.service (HttpServlet.java:853)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

>
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
> at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> at org.apache.catalina.core.StandardPipeline.invoke 
> (StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext 
> (StandardPipeline.java:643)
> at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at org.apache.catalina.core.StandardContext.invoke 
> (StandardContext.java:2396)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java

> :643)
> at 
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
> at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> at org.apache.catalina.core.StandardPipeline.invoke 
> (StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> at 
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext 
> (StandardPipeline.java:643)
> at 
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> at org.apache.coyote.tomcat4.CoyoteAdapter.service 
> (CoyoteAdapter.java:223)
> at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
> at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
> at 
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
> at java.lang.Thread.run(Thread.java:484)
>    




Mime
View raw message