struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Dowgiallo" <edowg...@ptdprolog.net>
Subject Re: Oracle DataSource configuration
Date Mon, 29 Dec 2003 19:53:52 GMT
OK.

I have moved the Oracle JDBC library from shared/lib to common/lib.  Same
error message.  SQLException: Cannot create JDBC driver of class '' for
connect URL 'null'

Restarted Tomcat service.  Same error message.

Removed all the javax.sql... classes from classes12.jar and
classes12dms.jar.  Same error message.

Logged a few sanity checks.  All look OK.
    Value of servlet init parameter data-source is Library
    InitialContext is not null
    Context for java:/comp/env is not null
    dataSource is not null: org.apache.commons.dbcp.BasicDataSource@9b688e

Any other ideas?

Has anyone successfully configured oracle.jdbc.pool.OracleDataSourceFactory
or oracle.jdbc.pool.OracleConnectionPoolDataSource instead of or in addition
to org.apache.commons.dbcp.BasicDataSourceFactory and
oracle.jdbc.driver.OracleDriver?

Thank you,
Ed

----- Original Message ----- 
From: "Kris Schneider" <kris@dotech.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Monday, December 29, 2003 12:13 PM
Subject: RE: Oracle DataSource configuration


> The following:
>
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html
>
> explains TC 4.1's class loaders. Personally, I also place JDBC drivers in
> $CATALINA_HOME/common/lib. If they're in $CATALINA_HOME/shared/lib, then
all web
> apps can "see" them but catalina can't, IIRC.
>
> Quoting Ben Anderson <stuts_andersonbd1@hotmail.com>:
>
> > not sure if this matters, but my oracle jar is in common/lib instead of
> > shared/lib.  I'm not familiar with the differences/uses of common and
> > shared, but that's how mine works.
> > -Ben
> >
> >
> > >From: "Ed Dowgiallo" <edowgial@ptdprolog.net>
> > >Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > >To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > >Subject: Oracle DataSource configuration
> > >Date: Mon, 29 Dec 2003 11:12:11 -0500
> > >
> > >I'm running into the following exception when issuing a getConnection
to an
> >
> > >Oracle DataSource.
> > >
> > >SQLException: Cannot create JDBC driver of class '' for connect URL
'null'
> > >
> > >It has the following definition in a Tomcat 4.1.29 server.xml file.
> > >
> > ><Resource name="Library" auth="Container" scope="Shareable"
> > >type="javax.sql.DataSource"/>
> > >
> > ></ResourceParams>
> > >
> > ><ResourceParams name="Library">
> > >
> > ><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.202:1521:tpeds002</value>
> > >
> > ></parameter>
> > >
> > ><parameter>
> > >
> > ><name>username</name>
> > >
> > ><value>abc</value>
> > >
> > ></parameter>
> > >
> > ><parameter>
> > >
> > ><name>password</name>
> > >
> > ><value>xyz</value>
> > >
> > ></parameter>
> > >
> > ><parameter>
> > >
> > ><name>maxActive</name>
> > >
> > ><value>25</value>
> > >
> > ></parameter>
> > >
> > ><parameter>
> > >
> > ><name>maxIdle</name>
> > >
> > ><value>10</value>
> > >
> > ></parameter>
> > >
> > ><parameter>
> > >
> > ><name>maxWait</name>
> > >
> > ><value>-1</value>
> > >
> > ></parameter>
> > >
> > ></ResourceParams>
> > >
> > >I have setup the following resource-ref in the applications web.xml
file.
> > >
> > >   <resource-ref>
> > >     <description>Oracle DataSource</description>
> > >     <res-ref-name>Library</res-ref-name>
> > >     <res-type>javax.sql.DataSource</res-type>
> > >     <res-auth>Container</res-auth>
> > >   </resource-ref>
> > >
> > >The JDBC library is a class12.jar file in the Tomcat shared/lib
directory.
> > >
> > >Comments and suggestions are most welcome.
> > >
> > >Thank you,
> > >
> > >Ed
>
> -- 
> Kris Schneider <mailto:kris@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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


Mime
View raw message