IllegalArgumentException: interface macromedia.jdbc.base.BaseConnectionInternal is not visible from class loader
bardware opened this issue · 3 comments
I'm on an Adobe Coldfusion Server, I observe the following on Coldfusion 11 and the 2016 release.
- I create an "other" datasource and am able to enter a JDBC URL like
jdbcperflogger:jdbc:macromedia:sqlserver://127.0.0.1\sqlexpress12;databaseName=mydb;sendStringParametersAsUnicode=false
orjdbcperflogger:jdbc:jtds:sqlserver://./dbsync;instance=LOCALDB#0CB6F1A9;namedPipe=true
. The URLs are prefixed with you signature. This works great. Once for the free JDBC driverjtds
and once for Adobe's own. - I add
-avaagent:jdbc-perf-logger-agent-0.8.1.jar
to my JVM arguments.- free driver
jtds
works well - Adobe's driver throws:
java.sql.SQLException: java.lang.IllegalArgumentException: interface macromedia.jdbc.base.BaseConnectionInternal is not visible from class loader
- free driver
Does this mean anything to you? How is there a difference between the two methods of wrapping the JDBC driver?
"Error","ajp-nio-8016-exec-9","05/09/17","22:38:40","","java.lang.IllegalArgumentException: interface macromedia.jdbc.base.BaseConnectionInternal is not visible from class loader"
java.sql.SQLException: java.lang.IllegalArgumentException: interface macromedia.jdbc.base.BaseConnectionInternal is not visible from class loader
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:142)
at ch.sla.jdbcperflogger.agent.DriverInterceptor.connect(DriverInterceptor.java:13)
at macromedia.jdbc.MacromediaDriver.connect(Unknown Source)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: interface macromedia.jdbc.base.BaseConnectionInternal is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
at java.lang.reflect.WeakCache.get(WeakCache.java:127)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:169)
at ch.sla.jdbcperflogger.agent.DriverInterceptor.connect(DriverInterceptor.java:13)
at macromedia.jdbc.sqlserverbase.BaseDriver.connect(Unknown Source)
at macromedia.jdbc.MacromediaDriver.connect$original$U6g7QMBl(Unknown Source)
at macromedia.jdbc.MacromediaDriver.connect$original$U6g7QMBl$accessor$xZbREMdt(Unknown Source)
at macromedia.jdbc.MacromediaDriver$auxiliary$RZCyrDeY.call(Unknown Source)
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:137)
... 5 more
Best,
Bernhard Döbler
I just happened to try to get your tool working with two other JDBC drivers and got two new exceptions:
"Error","ajp-bio-8014-exec-1","06/16/17","17:15:23",,"java.lang.IllegalArgumentException: interface macromedia.jdbc.extensions.ExtConnection is not visible from class loader"
java.sql.SQLException: java.lang.IllegalArgumentException: interface macromedia.jdbc.extensions.ExtConnection is not visible from class loader
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:149)
at ch.sla.jdbcperflogger.agent.DriverInterceptor.connect(DriverInterceptor.java:13)
at macromedia.jdbc.MacromediaDriver.connect(Unknown Source)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: interface macromedia.jdbc.extensions.ExtConnection is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
at java.lang.reflect.WeakCache.get(WeakCache.java:127)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:176)
at ch.sla.jdbcperflogger.agent.DriverInterceptor.connect(DriverInterceptor.java:13)
at macromedia.jdbc.oraclebase.BaseDriver.connect(Unknown Source)
at macromedia.jdbc.MacromediaDriver.connect$original$yLSC9IJR(Unknown Source)
at macromedia.jdbc.MacromediaDriver.connect$original$yLSC9IJR$accessor$eI5OqTkq(Unknown Source)
at macromedia.jdbc.MacromediaDriver$auxiliary$cjEmGu7X.call(Unknown Source)
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:144)
... 5 more
"Error","ajp-bio-8014-exec-1","06/16/17","17:18:23",,"java.sql.SQLException: java.lang.IllegalArgumentException: interface oracle.sql.BlobDBAccess is not visible from class loader"
java.sql.SQLException: java.sql.SQLException: java.lang.IllegalArgumentException: interface oracle.sql.BlobDBAccess is not visible from class loader
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:142)
at ch.sla.jdbcperflogger.driver.WrappingDriver.connect(WrappingDriver.java:121)
at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:614)
at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: java.lang.IllegalArgumentException: interface oracle.sql.BlobDBAccess is not visible from class loader
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:149)
at ch.sla.jdbcperflogger.agent.DriverInterceptor.connect(DriverInterceptor.java:13)
at oracle.jdbc.OracleDriver.connect(OracleDriver.java)
at ch.sla.jdbcperflogger.driver.WrappingDriver$1.call(WrappingDriver.java:124)
at ch.sla.jdbcperflogger.driver.WrappingDriver$1.call(WrappingDriver.java:121)
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:137)
... 4 more
Caused by: java.lang.IllegalArgumentException: interface oracle.sql.BlobDBAccess is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
at java.lang.reflect.WeakCache.get(WeakCache.java:127)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:176)
at ch.sla.jdbcperflogger.agent.DriverInterceptor.connect(DriverInterceptor.java:13)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at oracle.jdbc.OracleDriver.connect$accessor$MBH3Jwhr(OracleDriver.java)
at oracle.jdbc.OracleDriver$auxiliary$IG5gVHSH.call(Unknown Source)
at ch.sla.jdbcperflogger.driver.WrappingDriver.wrapConnection(WrappingDriver.java:144)
... 9 more
The first is Macromedia's Oracle driver. The second is Oracle's own Thin Driver.
fixed. The problem occurred when the underlying driver is loaded by a child classloader and the Connection it creates implements interfaces that are loaded by this child classloader.
I released version 0.8.2 which contains the fix. It should be available in Maven Central in a few hours.
Thanks for reporting this bug.