tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Busfy,Peter" <Peter.Bu...@drei.com>
Subject RE: tomcat and DB oracle problem - only in higher versions
Date Tue, 21 Aug 2012 08:37:11 GMT
Hello,

you are absolutely right.

>From Tomcat 6.0.27 (also tomcat 7) was changed implementation of DBCP (database connection
pool) in tomcat (see http://tomcat.apache.org/tomcat-6.0-doc/changelog.html).

We use in database connection SimpleNativeJdbcExtractor, which doesn't work with higher implementation
of DBCP. It's necessary to use CommonsDbcpNativeJdbcExtractor instead.

See:
 http://static.springsource.org/spring/docs/1.2.9/api/org/springframework/jdbc/support/nativejdbc/SimpleNativeJdbcExtractor.html
 http://static.springsource.org/spring/docs/1.2.9/api/org/springframework/jdbc/support/nativejdbc/CommonsDbcpNativeJdbcExtractor.html

And now it is working also with higher versions.

Thank you all very much for your effort.

Peter Busfy




-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
Sent: Friday, August 17, 2012 1:44 PM
To: Tomcat Users List
Subject: Re: tomcat and DB oracle problem - only in higher versions

2012/8/17 Busfy,Peter <Peter.Busfy@drei.com>:
> Hi again,
>
> so I try ojdbc6.jar (version 11.2.0.3.0) with tomcat 6.0.35 and the same problem.
> With version 6.0.26 is everything fine.
>

6.0.26 and 6.0.35 include different versions of Apache Commons DBCP library (http://commons.apache.org/dbcp/).
 You may look into the changelog or into build.properties in the source distributive to see
the version number.

Later DBCP versions implement wrapping of the underlying JDBC connection object differently.

On this mailing list such issue has been discussed at least 3 times during the last 2 years.
(I do not remember what the exact recipe was. I think that you have to do the following two
operations:
1. set a property on the pool to allow unwrapping, 2. call a method to get the wrapped connection.
 See the archives and see the DBCP site).

>From that Spring message -- I guess you have to look for "NativeJdbcExtractor" implementations
and find one that works with DBCP.

See OracleLobHandler.etNativeJdbcExtractor(..)

http://static.springsource.org/spring/docs/3.1.x/javadoc-api/org/springframework/jdbc/support/lob/OracleLobHandler.html#setNativeJdbcExtractor%28org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor%29

There exists "CommonsDbcpNativeJdbcExtractor" class. Maybe it will work for you.

If not, you may try debugging Tomcat (see "Developing" chapter in the Tomcat FAQ for tips).

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
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