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 RE: Cannot load JDBC driver class 'null' - Tomcat standalone 4.1. 27 w hen trying instantiate datasource object.
Date Wed, 10 Sep 2003 22:14:51 GMT
Yeah I had already tried that.  When It was not there I got this message on
Tomcat startup - java.lang.reflect.InvocationTargetException:
java.lang.NoClassDefFoundError: javax/sql/DataSource

I'm kind of stumped on this.  Any other ideas?

Later,


Robert Wynkoop

-----Original Message-----
From: Phillip Qin [mailto:Phillip.Qin@shareowner.com]
Sent: Wednesday, September 10, 2003 5:11 PM
To: 'Tomcat Users List'
Subject: RE: Cannot load JDBC driver class 'null' - Tomcat standalone
4.1. 27 w hen trying instantiate datasource object.


If you use oracle jdbc driver, put classes12.jar in common/lib

-----Original Message-----
From: Wynkoop, Robert M [mailto:robert.m.wynkoop@citigroup.com] 
Sent: September 10, 2003 6:06 PM
To: Tomcat Mailing List (E-mail)
Subject: Cannot load JDBC driver class 'null' - Tomcat standalone 4.1.27 w
hen trying instantiate datasource object.

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

---------------------------------------------------------------------
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