I am migrating from Tomcat 5.0 w/ MSQL 4.1 to Tomcat 5.5 w/ MySQL Server 
version: 5.0.51a-3ubuntu5 (Ubuntu). I have followed the Tomcat Tutorials 
changing 
from: ResourceLink in context.xml -> Resource in server.xml 
to: just Resource in context.xml. 

<Resource name="jdbc/MySql" auth="Container" type="javax.sql.Datasource" 
factory="org.apache.commons.dbcp.BasicDataSourceFactory" 
url="jdbc:mysql://localhost.localdomain/rsa?autoReconnect=true" 
driverClassName="com.mysql.jdbc.Driver" 
password="******" username="jsrsys" 
maxWait="10000" maxActive="200" maxIdle="5" 
removeAbandoned="true" removeAbandonedTimeout="300" logAbandoned="true" 
/> 
Note: password ****** not real password! 

My jdbc driver jar is: mysql-connector-java-5.0.8-bin.jar 
When my Java application tries to connect it throws the error: 
org.apache.naming.ResourceRef cannot be cast to javax.sql.DataSource 

The application code works fine with the old MySQL and Tomcat in both Fedora 
and Windows. I can't figure out what I may have done wrong or where to turn 
next. 

Any advice would be sincerely appreciated.

Reply via email to