-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Vishal,

On 6/30/16 10:46 AM, Balana, Vishal wrote:
> I have following resource configuration for Oracle Data source
> Pool and trying to unwrap the connection object using:
> 
> OracleConnection conn = connection.unwrap(OracleConnection.class);

Why do you need an OracleConnection instead of a standard
java.sql.Connection?

> And getting following exception:
> 
> com.sun.proxy.$Proxy77.unwrap exception : java.sql.SQLException:
> Not a wrapper of oracle.jdbc.OracleConnection
> 
> Anybody has any idea what is missing here?
> 
> <Resource name="jdbc/OracleDataSource" auth="Container" 
> type="javax.sql.DataSource" 
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" 
> driverClassName="oracle.jdbc.driver.OracleDriver" 
> url="jdbc:oracle:thin:@(XYZ)" username="ABC" password="ABC" 
> initialSize="10" maxActive="10" minIdle="10" maxIdle="10" 
> maxWait="10000" timeBetweenEvictionRunsMillis="30000" 
> minEvictableIdleTimeMillis="30000" testOnBorrow="true" 
> validationQuery="select 1 from dual" validationInterval="30000" 
> removeAbandoned="true" removeAbandonedTimeout="600" 
> logAbandoned="true" testWhileIdle="false" testOnReturn="false" 
> jmxEnabled="true" accessToUnderlyingConnectionAllowed="true" 
> jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionSt
ate;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;org.apach
e.tomcat.jdbc.pool.interceptor.ResetAbandonedTimer"/>

You
> 
are using a JDBC connection pool, so the connections coming from
the pool aren't raw OracleConnections.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJXfW0dAAoJEBzwKT+lPKRYU9UP/3+YNbwMbGAnugOJ1SFXQg4K
w7j2MkuzQzAAJ1RHOqITdLKhsC0p+FYvGZvvop9m+c5KEarhrEqkT4AS13kQauKh
frsjxZwBEGh9XJp/D/7bbmY9C7z/2jcx2QAk4ddfBY3CVzKUyaR8WG/hNi4yTXFE
oiOBDLDOjj1zPjsSK8bwhm9g84eeyJF4zxocWF5YXECrVXl6FypV+yUcWEoOzCqG
fUVsII1HnRN0bg/CvH+38kIa6tdnnbMtxW2iBmpoZak4tYar/UR3gtkdR/oQ4COA
yKiP1vmMCbka2LAcK0Y9eysFiuhU/IXxxK+jyxl5QRTI9IIaf6/RYogjgi4mhv/e
q5E6nmHkalpMU6l1Fbp3vhuXFBGgwQDtu0XRPyIYy1JKV6GtQqEuh31bUQf3Ntc0
ZI1TMMc1SmwbYO+Jv4uoo72maL2aL8z+v3Ad6lynQ064/x+GtRfQJHmzm8NGcGOK
Fl8z5ef6GxhmXZxs0GJp6dygWTJ2ZZ8kgX7lyhM8XruifQggdCZ6/PFst1R6ivWx
nMegJ2RTk1musMYHk7izpPlNGsDCG9fqyjYMu7FIBtASYlbeoLK7flExkVl1Dvee
D+CuSEsP9EckNLLe7WOUEvAD0vAAVYJJljUvj0Ka4Nif9VgytNRffr4glk0AWoX6
VAyhTcl9qzJ93C5KMn14
=McMB
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to