You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm working with a tomee setup that has a datasource defined which looks like this (I've already added accessToUnderlyingConnectionAllowed true as mentioned in the README) in tomee.xml:
The actual query is fired (visible in the logs) but afterwards (I guess when the result is processed) an error is thrown: class com.sun.proxy.$Proxy73 cannot be cast to class oracle.jdbc.OracleConnection (com.sun.proxy.$Proxy73 is in unnamed module of loader org.apache.tomee.catalina.TomEEWebappClassLoader @400304c1; oracle.jdbc.OracleConnection is in unnamed module of loader java.net.URLClassLoader @5a1c0542) (Java::JavaLang::ClassCastException)
I'm not sure how to tackle this, looks like the connection-pool on the tomee side is not compatible with how the gem handles database connections... there seems to be some kind of handling of connection pools but somehow this doesn't work in my case.
Am I missing an important piece somewhere or is additional configuration needed for this use case? I'm happy for any hints. Thanks a lot in advance!
System configuration
Rails version: 6.0.3.5
Oracle enhanced adapter version: 6.0.6
Ruby version: jruby 9.2.16.0 (2.5.7)
Oracle Database version: 19.3.0-ee
The text was updated successfully, but these errors were encountered:
Hi,
I'm working with a tomee setup that has a datasource defined which looks like this (I've already added
accessToUnderlyingConnectionAllowed true
as mentioned in the README) in tomee.xml:In the web.xml the above resource is referenced:
In the database.yml access is configured via jndi:
Expected behavior
ActiveRecord database access works as usual.
Actual behavior
The actual query is fired (visible in the logs) but afterwards (I guess when the result is processed) an error is thrown:
class com.sun.proxy.$Proxy73 cannot be cast to class oracle.jdbc.OracleConnection (com.sun.proxy.$Proxy73 is in unnamed module of loader org.apache.tomee.catalina.TomEEWebappClassLoader @400304c1; oracle.jdbc.OracleConnection is in unnamed module of loader java.net.URLClassLoader @5a1c0542) (Java::JavaLang::ClassCastException)
Full stacktrace:
I'm not sure how to tackle this, looks like the connection-pool on the tomee side is not compatible with how the gem handles database connections... there seems to be some kind of handling of connection pools but somehow this doesn't work in my case.
Am I missing an important piece somewhere or is additional configuration needed for this use case? I'm happy for any hints. Thanks a lot in advance!
System configuration
Rails version: 6.0.3.5
Oracle enhanced adapter version: 6.0.6
Ruby version: jruby 9.2.16.0 (2.5.7)
Oracle Database version: 19.3.0-ee
The text was updated successfully, but these errors were encountered: