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!

William 

                                          
_________________________________________________________________
Hotmail: Trusted email with Microsoft's powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/
http://clk.atdmt.com/GBL/go/177141664/direct/01/

Reply via email to