WM C wrote: > Hi - > > I am upgrading a working web app from Tomcat 5.0 to 5.5, and encounter the > following data source problem. > > According to Apache web site, for Tomcat 5.5 configuration, I should use > > factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory > > in <Resource> for datasource configuration. > > It works okay for the most jdbc part, except that I got an exception of > > java.lang.ClassCastException: oracle.sql.CLOB > > at the line oracle.sql.CLOB clob = (oracle.sql.CLOB) rs.getClob(...) in one > DAO method. > > Since the code works in Tomcat5.0, so I changed factory attribute back to > > factory="org.apache.commons.dbcp.BasicDataSourceFactory" > > and everything works fine now. No exception thrown anymore. > > Since this is a kind of a desperate "trail and error" after scratching my > head for a day (true Black Friday :( ) > so even though it works, I am wondering if I should use the DataSourceFactory > meant to be used for Tomcat 5.0, and if there will be any bad consequences > later on. > > Thanks a lot for any comments - I appreciate!
Where is the oracle jdbc driver jar located? Where are the commons-dbcp and commons-pool JARs located? Exactly which versions of Tomcat, commons-pool and commons-dbcp are you using? What is the full stack trace? What is your complete resource definition? Which file has this resource definition been placed in? Do you want to use Tomcat's built-in connection pool or are you happy with anything as long as it works? Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org