-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan,

On 3/8/12 6:29 AM, hodgesz wrote:
> Yes you are correct we are creating the pool in Spring
> configuration as it is more natural for our application, but the
> only problem we see now is once we upgraded to 7.0.26 we see the
> following exception in the logs when viewing through JMXProxy.  The
> data is retrieved correctly so the exception is a little baffling.
> 
> [snip]
> 
> Mar 6, 2012 9:18:20 AM org.apache.catalina.mbeans.MBeanDumper
> dumpBeans SEVERE: Error getting attribute
> bean:name=eventingDataSource PooledConnection 
> javax.management.MBeanException: RuntimeException thrown in 
> RequiredModelMBean while trying to invoke operation
> getPooledConnection at 
> javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1091)
>  at 
> javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:955)
>  at 
> org.springframework.jmx.export.SpringModelMBean.invoke(SpringModelMBean.java:90)
>  at 
> javax.management.modelmbean.RequiredModelMBean.getAttribute(RequiredModelMBean.java:1358)
>  at 
> org.springframework.jmx.export.SpringModelMBean.getAttribute(SpringModelMBean.java:109)
> 
> 
> [snip]
> 
> Caused by: java.lang.ClassCastException: $Proxy5 cannot be cast to 
> org.apache.tomcat.jdbc.pool.PooledConnection at 
> org.apache.tomcat.jdbc.pool.DataSourceProxy.getPooledConnection(DataSourceProxy.java:156)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> 
> [snip]

And another exception:

> Mar 6, 2012 9:18:22 AM org.apache.catalina.mbeans.MBeanDumper
> dumpBeans SEVERE: Error getting attribute
> bean:name=eventingDataSource XAConnection 
> javax.management.MBeanException: Exception thrown in
> RequiredModelMBean while trying to invoke operation getXAConnection
>  at 
> javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1101)
>  at 
> javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:955)
>  at 
> org.springframework.jmx.export.SpringModelMBean.invoke(SpringModelMBean.java:90)
>  at 
> javax.management.modelmbean.RequiredModelMBean.getAttribute(RequiredModelMBean.java:1358)
>  at 
> org.springframework.jmx.export.SpringModelMBean.getAttribute(SpringModelMBean.java:109)
> 
> 
> [snip]
> 
> Caused by: java.sql.SQLException: Connection from pool does not
> implement javax.sql.XAConnection at 
> org.apache.tomcat.jdbc.pool.DataSourceProxy.getXAConnection(DataSourceProxy.java:134)
> 
It looks like a bug to me.

The problem is I'm not sure if that's a bug in Tomcat's code or in
Spring's code, since both code is involved in both stack traces.

I would probably look first in the jdbc-pool code to see if a Proxy is
being created that does not include all the proper interfaces
(obviously XAConnection and PooledConnection are the ones to look for).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9Yx+0ACgkQ9CaO5/Lv0PC9CwCeOoOn+Psujish6GalM9mSpwHI
cPcAoIEWTzzxPLKbvuFT/nOBT3XEDIJg
=U/vE
-----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