tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Casteen <robert.cast...@testadvantage.com>
Subject Re: Firebird|Tomcat "java.sql.SQLException: Cannot load JDBC dri ver class 'null'"
Date Tue, 27 May 2003 20:58:37 GMT
Thank you Chong for your reply,
Perhaps I need to clarify, I have downloaded the FirebirdSQL-1.0.0 
(Jaybird) driver and am following the directions in the FAQ file, with 
modifications to the connection url for the fact that I am on a windows 
system. As far as the type 4 driver that is included (that you 
mentioned), I do not see any info other than release notes (which seem 
to indicate the driver I downloaded and installed are same as the one 
included) the information in the release are very general in nature and 
not help in the way of  installation and testing. The Jaybird driver is 
the one I wish to use due to the connection pooling feature, I am 
following the information in the Tomcat "jndi-datasource" howto in the 
Tomcat docs, although as indicated in my previous email, I am having 
little luck. In addition, I want to confirm that I have placed all 
relevant .jars in the commom/lib directory. Again thank you for your 
previous response - any additional assistance will be very helpful.
Thank you,
Rob



Chong Yu Meng wrote:

>Hello Rob !
>
>I'm not sure if you are aware : the Firebird database comes with 2 JDBC 
>"flavors", a Type 4 JDBC driver (which is a separate download) and 
>Interclient (which is really more of a JDBC mediation component). The 
>configuration for Interclient is covered in this link : 
>http://www.kpi.com.au/interbase/index.jsp while the configuration for 
>the Type 4 JDBC driver is in the README file that comes with the driver 
>download. Depending on which driver you use, the configuration is *very*
>
>different! If you are following the MySQL examples, you should use the 
>Type 4 driver.
>
>Second, make sure that your JDBC driver is in your CLASSPATH and that 
>Tomcat can "see" it. That is, either point to it explicitly in your 
>CLASSPATH, or save the jar file into $TOMCAT_HOME/common/lib.
>
>HTH
>
>Regards,
>pascal chong
>
>
>
>
>Rob Casteen wrote:
>
>  
>
>>Hey guys, I am hoping I could get some help with this issue. The 
>>research I have done online reveals this error with several databases 
>>although I have yet to find a actionable answer nor anything firebird 
>>spoecific. I am attempting to connect Firebird to Tomcat based on the 
>>MYSQL example in the Tomcat Docs and through the datasource setup in 
>>the administration console. I have attempted to include all relevant 
>>data to show the activity on my server,  including the log, the 
>>example code, and the relevant server.xml code.
>>
>>I appreciate all help that you can offer.
>>Rob
>>
>>**************Log
>>
>>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.ja
>va:312) 
>  
>
>>   at foo.DBTest.init(DBTest.java:23)
>>   at org.apache.jsp.test_jsp._jspService(test_jsp.java:49)
>>   at
>>    
>>
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
>  
>
>>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>   at 
>>
>>    
>>
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
>va:204) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
>  
>
>>   at
>>    
>>
>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>  
>
>>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>   at 
>>
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>tionFilterChain.java:247) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>erChain.java:193) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>e.java:260) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:643) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
>80) 
>  
>
>>   at 
>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>e.java:191) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:643) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
>80) 
>  
>
>>   at 
>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
>5) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>:180) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:643) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
>lve.java:170) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:641) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>:172) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:641) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
>80) 
>  
>
>>   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.i
>nvokeNext(StandardPipeline.java:643) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
>80) 
>  
>
>>   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:43
>2) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
>onnection(Http11Protocol.java:386) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:53
>4) 
>  
>
>>   at 
>>
>>    
>>
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
>.java:530) 
>  
>
>>   at java.lang.Thread.run(Thread.java:536)
>>
>>
>>
>>***************Server.xml additions:
>>   <ResourceParams name="TestDB">
>>     <parameter>
>>       <name>validationQuery</name>
>>       <value></value>
>>     </parameter>
>>     <parameter>
>>       <name>maxWait</name>
>>       <value>5000</value>
>>     </parameter>
>>     <parameter>
>>       <name>maxActive</name>
>>       <value>4</value>
>>     </parameter>
>>     <parameter>
>>       <name>password</name>
>>       <value>masterkey</value>
>>     </parameter>
>>     <parameter>
>>       <name>url</name>
>>       
>>
>>    
>>
><value>jdbc:firebirdsql:localhost/3050:C:\\Firebird\\DBcontain\\JAVATEST
>.FDB</value> 
>  
>
>>     </parameter>
>>     <parameter>
>>       <name>driverClassName</name>
>>       <value>org.firebirdsql.jdbc.FBDriver</value>
>>     </parameter>
>>     <parameter>
>>       <name>maxIdle</name>
>>       <value>2</value>
>>     </parameter>
>>     <parameter>
>>       <name>username</name>
>>       <value>sysdba</value>
>>     </parameter>
>>   </ResourceParams>
>> </GlobalNamingResources>
>>**********************code
>>*******web-inf
>><?xml version="1.0" encoding="ISO-8859-1"?>
>>   <!DOCTYPE web-app PUBLIC
>>   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>>   "http://java.sun.com/dtd/web-app_2_3.dtd">
>><web-app>
>> <description>Firebird Test App</description>
>> <resource-ref>
>>     <description>DB Connection</description>
>>     <res-ref-name>jdbc/TestDB</res-ref-name>
>>     <res-type>javax.sql.DataSource</res-type>
>>     <res-auth>Container</res-auth>
>> </resource-ref>
>></web-app>
>>*******jsp
>><html>
>> <head>
>>   <title>DB Test</title>
>> </head>
>> <body>
>>
>> <%
>>   foo.DBTest tst = new foo.DBTest();
>>   tst.init();
>> %>
>>
>> <h2>Results</h2>
>>   Foo <%= tst.getFoo() %><br/>
>>   Bar <%= tst.getBar() %>
>>
>> </body>
>></html>
>>*********************\\\
>>I have included the dbtest class in the db_test\WEB-INF\classes\foo 
>>directory
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>  
>

-- 
Thanks, 
        Robert Casteen 

 TEST ADVANTAGE, Inc.           Direct Tel: [1] 480-337-3367 
 1525 West 10th Place         	Main Tel: [1] 480-337-3377 
 Tempe, Arizona 85281 USA       Fax: [1] 480 337 3370 

 Email: robert.casteen@testadvantage.com 
 Web: www.testadvantage.com 




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message