tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wynkoop, Robert M" <robert.m.wynk...@citigroup.com>
Subject Cannot load JDBC driver class 'null' - Tomcat standalone 4.1.27 w hen trying instantiate datasource object.
Date Wed, 10 Sep 2003 22:05:50 GMT
The error(Wen I try to use a JNDI resource in my webapp.):

C:\jdk1.3.1_08\jre\bin\java -classpath
"C:\web\Tomcat4.1\bin\bootstrap.jar";"C:\jdk1.3.1_08\lib\tools.jar"
-Dcatalina.home="C:\web\Tomcat4.1" -Dcatalina.base="C:\web\Tomcat4.1"
org.apache.catalina.startup.Bootstrap "start" 
[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.18-LE-jdk14
[INFO] PropertyMessageResources - -Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true
[INFO] PropertyMessageResources - -Initializing,
config='org.apache.struts.action.ActionResources', returnNull=true
[INFO] PropertyMessageResources - -Initializing, config='remic_msgcat',
returnNull=true
[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
[INFO] ChannelSocket - -JK2: ajp13 listening on 0.0.0.0/0.0.0.0:8009
[INFO] JkMain - -Jk running ID=0 time=0/200
config=C:\web\Tomcat4.1\conf\jk2.properties
Cannot load JDBC driver class 'null'
java.lang.NullPointerException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:115)
        at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:523)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
29)
        at
com.citimortgage.common.datasource.DataSourceManager.getConnection(DataSourc
eManager.java:80)

I know I have the Oracle jar in the right place because I get this msg when
if I don't have it in <tomcatHome>/common/lib.

C:\jdk1.3.1_08\jre\bin\java -classpath
"C:\web\Tomcat4.1\bin\bootstrap.jar";"C:\jdk1.3.1_08\lib\tools.jar"
-Dcatalina.home="C:\web\Tomcat4.1" -Dcatalina.base="C:\web\Tomcat4.1"
org.apache.catalina.startup.Bootstrap "start" 
[INFO] Registry - -Loading registry information
[INFO] Registry - -Creating new Registry instance
[INFO] Registry - -Creating MBeanServer
[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
Exception during startup processing
java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError:
javax/sql/DataSource
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)

I googled for this answer.  The most common problem is not finding the
database driver in <tomcatHome>/common/lib.


Later,


Robert Wynkoop

Mime
View raw message