tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Ryder" <sry...@jsrsys.com>
Subject Re: Tomcat 5.5 org.apache.naming.ResourceRef cannot be cast to javax.sql.DataSource
Date Mon, 25 Jan 2010 16:37:04 GMT
Some more testing... I added "displays" before each of the connect 
statements.  I get (still with no factory):
2010-01-25 16:27:07:*WARNING*Connection to jdbc/MySql:: connect Other 
exception: Cannot create resource instance
2010-01-25 16:27:07:JsrSQL: Context cast successfull
2010-01-25 16:27:07:Driver=com.mysql.jdbc.Driver
which tells me the failure is on the DataSource cast statement.

I then added factory back in and got:
2010-01-25 16:35:01:*WARNING*Connection to jdbc/MySql:: connect Other 
exception: org.apache.naming.ResourceRef cannot be cast to 
javax.sql.DataSource
2010-01-25 16:35:01:JsrSQL: Context cast successfull
2010-01-25 16:35:01:Driver=com.mysql.jdbc.Driver

So, failure is in same place with factory, but a different error.

I appreciate your suggestions, and look forward to other things I might need 
to change.

----- Original Message ----- 
From: "Caldarale, Charles R" <Chuck.Caldarale@unisys.com>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Monday, January 25, 2010 8:52 AM
Subject: RE: Tomcat 5.5 org.apache.naming.ResourceRef cannot be cast to 
javax.sql.DataSource


>> From: Steve Ryder [mailto:sryder@jsrsys.com]
>> Subject: Tomcat 5.5 org.apache.naming.ResourceRef cannot be cast to
>> javax.sql.DataSource
>>
>> <Resource name="jdbc/MySql" auth="Container"
>> type="javax.sql.Datasource"
>> factory="org.apache.commons.dbcp.BasicDataSourceFactory"
>
> The specified factory is for the standard Apache commons DBCP, not the one 
> bundled with Tomcat.  You might try removing it and let the Tomcat DBCP 
> factory do its thing.
>
>> My jdbc driver jar is: mysql-connector-java-5.0.8-bin.jar
>
> Where is the JDBC jar located?
>
> Since you're upgrading, why not upgrade to 6.0.x?  (5.5 is not getting 
> much in the way of active development these days.)
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
> MATERIAL and is thus for use only by the intended recipient. If you 
> received this in error, please contact the sender and delete the e-mail 
> and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message