tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
Date Mon, 06 Jan 2003 03:41:40 GMT


On Mon, 6 Jan 2003, David Hemingway wrote:

> Date: Mon, 6 Jan 2003 13:45:08 +1100
> From: David Hemingway <dbh001@kooee.com.au>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Tomcat-4-1-12 Connection Pool problem JNDI Datasource
>
> Hi,
>
> Sorry if this has been addressed before on this list but I have not seen it. I have followed
the instructions in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html.
>
> I can get the setup to work 100% under win32 but using the same settings under linux
I get:
>
> java.sql.SQLException: Cannot load JDBC driver class 'null'
>
> I have seen this problem raised in many places but no one has seemed to know the correct
answer.
>

Have you examined the log files (in $CATALINA_HOME/logs) to see if there
are any interesting (or at least useful :-) error messages?

Have you tried the most recent production quality release (4.1.18)?  I
know there have been some bugfixes in the included commons-dbcp code that
might make a difference.

Craig


> My configuration is as follows:
>
> Linux - Red Hat 7.3
> Apache 1.3.27
> Tomcat 4.1.12 LE
> Oracle 9i
> Pool 1.0
> DBCP 1.0
> Collections 2.0
>
> common/lib/commons-collections.jar
> common/lib/commons-dbcp.jar
> common/lib/commons-pool.jar
> common/lib/classes12.jar (with the javax.sql removed)
>
> server.xml:
>
>
> <Context path="/lawonline" docBase="lawonline" debug="0"
>                  reloadable="true" crossContext="true">
>           <Logger className="org.apache.catalina.logger.FileLogger"
>                      prefix="localhost_lawonline_log." suffix=".txt"
>                   timestamp="true"/>
>           <Ejb   name="ejb/EmplRecord" type="Entity"
>                  home="com.wombat.empl.EmployeeRecordHome"
>                remote="com.wombat.empl.EmployeeRecord"/>
>
>  <Resource name="jdbc/myoracle" auth="Container"
>               type="javax.sql.DataSource"/>
>
>  <ResourceParams name="jdbc/myoracle">
>    <parameter>
>      <name>factory</name>
>      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>    </parameter>
>    <parameter>
>      <name>driverClassName</name>
>      <value>oracle.jdbc.driver.OracleDriver</value>
>    </parameter>
>    <parameter>
>      <name>url</name>
>      <value>jdbc:oracle:thin:@192.168.0.10:1521:lawol</value>
>    </parameter>
>    <parameter>
>      <name>username</name>
>      <value>lawonline</value>
>    </parameter>
>    <parameter>
>      <name>password</name>
>      <value>Le12No06</value>
>    </parameter>
>    <parameter>
>      <name>maxActive</name>
>      <value>10</value>
>    </parameter>
>    <parameter>
>      <name>maxIdle</name>
>      <value>10</value>
>    </parameter>
>    <parameter>
>      <name>maxWait</name>
>      <value>-1</value>
>    </parameter>
>  </ResourceParams>
>
>        <Environment name="maxExemptions" type="java.lang.Integer"
>                       value="15"/>
>           <Parameter name="context.param.name" value="context.param.value"
>                      override="false"/>
>           <Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
>                     type="javax.sql.DataSource"/>
>           <ResourceParams name="jdbc/EmployeeAppDb">
>             <parameter><name>username</name><value>sa</value></parameter>
>             <parameter><name>password</name><value></value></parameter>
>             <parameter><name>driverClassName</name>
>               <value>org.hsql.jdbcDriver</value></parameter>
>             <parameter><name>url</name>
>               <value>jdbc:HypersonicSQL:database</value></parameter>
>           </ResourceParams>
>           <Resource name="mail/Session" auth="Container"
>                     type="javax.mail.Session"/>
>           <ResourceParams name="mail/Session">
>             <parameter>
>               <name>mail.smtp.host</name>
>               <value>localhost</value>
>             </parameter>
>           </ResourceParams>
>           <ResourceLink name="linkToGlobalResource"
>                     global="simpleValue"
>                     type="java.lang.Integer"/>
> </Context>
>
>
> web.xml:
>
> <resource-ref>
>   <description>DB Connection</description>
>   <res-ref-name>jdbc/myoracle</res-ref-name>
>   <res-type>javax.sql.DataSource</res-type>
>   <res-auth>Container</res-auth>
> </resource-ref>
>
>
> The ejb and jdbc/EmployeeAppDb was there as default when I started, should it be removed
seeing as it isn't being used?
> I have been at this for weeks now. Any help would be very much appreciated. Thank you
>
> regards,
> David Hemingway
>
>


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


Mime
View raw message