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'
Date Thu, 11 Sep 2003 12:54:21 GMT
I'm having the same problem.  From what I read the most common problem is
that you jdbc driver jar is not in <tomcatehome>/common/lib dir.  Apparently
if its only the the web apps ../WEB-INF/lib the tomcat runtime does not have
access to it.  But, I still have the same problem.  I know the jar file is
getting used from ../common/lib because I can delete it when Tomkitty is
fired up.

What version of Tomcat are you using.  I'm using V4.1.27LE(No sax parser
included.) JDK 1.3.  I'm currently doing a new install of tomcat LE.  If
that does not work I'm trying Tomcat standard from
http://www.tux.org/pub/net/apache/dist/jakarta/tomcat-4/

Later,

Rober Wynkoop
-----Original Message-----
From: Ben Anderson [mailto:stuts_andersonbd1@hotmail.com]
Sent: Thursday, September 11, 2003 7:17 AM
To: tomcat-user@jakarta.apache.org
Subject: Cannot load JDBC driver class 'null'


Ok, I know this topic has been posted many times, but I can't find anything 
to help.

I have OracleDriver in [$CATALINA_HOME]/common/lib
here's my server.xml
<GlobalNamingResources>
......................
<Resource name="myDS" scope="Shareable" type="javax.sql.DataSource" 
auth="Container"/>
    <ResourceParams name="myDS">
      <parameter>
        <name>validationQuery</name>
        <value>select user from dual;</value>
      </parameter>
      <parameter>
        <name>url</name>
        <value>jdbc:oracle:thin:myMachine:1521:myDBName</value>
      </parameter>
      <parameter>
        <name>username</name>
        <value>hris</value>
      </parameter>
      <parameter>
        <name>password</name>
        <value>****</value>
      </parameter>
      <parameter>
        <name>maxActive</name>
        <value>4</value>
      </parameter>
      <parameter>
        <name>maxWait</name>
        <value>5000</value>
      </parameter>
      <parameter>
        <name>driverClassName</name>
        <value>oracle.jdbc.driver.OracleDriver</value>
      </parameter>
      <parameter>
        <name>maxIdle</name>
        <value>2</value>
      </parameter>
    </ResourceParams>
  </GlobalNamingResources>

and my web.xml:

    <resource-ref>
        <res-ref-name>jdbc/fsaDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>

in the administrative tool:
the top level Resources->DataSources looks ok as MyDS is listed there
but the /my_context->Resources->Datasources gives:
org.apache.jasper.JasperException: Exception retrieving attribute 
'driverClassName'

and the localhost_log.xxx.txt (when it tries to use myDS):
java.sql.SQLException: Cannot load JDBC driver class 'null

Any help would be great - I've been trying everything - reloading with 
different configurations about 50 times - looking through books, mailing 
lists/archives.
Thanks,
Ben

_________________________________________________________________
Get 10MB of e-mail storage! Sign up for Hotmail Extra Storage.  
http://join.msn.com/?PAGE=features/es


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