java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to org.apache.tomcat.jdbc.pool.DataSource
问题 I'm running Tomcat 7.0.22 and I wrote a simple servlet that connects to a SQL Anywhere 12.0 database. When I run the servlet I get java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.BasicDataSource cannot be cast to org.apache.tomcat.jdbc.pool.DataSource. My ./META-INF/content.xml file looks like the following: <Context> <Resource name="jdbc/FUDB" auth="Container" type="javax.sql.DataSource" username="dba" password="sql" driverClassName="sybase.jdbc.sqlanywhere.IDriver" factory="org