You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2023/10/10 17:41:06 UTC
[Bug 67664] New: IllegalArgumentException in ConnectionPool.getProxyConstructor
https://bz.apache.org/bugzilla/show_bug.cgi?id=67664
Bug ID: 67664
Summary: IllegalArgumentException in
ConnectionPool.getProxyConstructor
Product: Tomcat Modules
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: jdbc-pool
Assignee: dev@tomcat.apache.org
Reporter: tza@silbergrau.com
Target Milestone: ---
With the update to tomcat 9.0.81 (due to the released CVE) we run into an
IllegalArgumentException.
Looking at the previous implementation before (9.0.80), it seems like some
refactoring issue. I hope i chose the right project/component and I didnt find
a similar bug report yet.
Previous implementation did
Proxy.getProxyClass(ConnectionPool.class.getClassLoader(), new Class[]
{java.sql.Connection.class,javax.sql.PooledConnection.class});
New implementation is
Proxy.getProxyClass(ConnectionPool.class.getClassLoader(), new Class[]
{Connection.class,PooledConnection.class});
-> Connection has import to java.sql.Connection.class and works as before.
-> PooledConnection has no import and now resolves to
org.apache.tomcat.jdbc.pool.PooledConnection and leads to the
IllegalArgumentException (was javax.sql.PooledConnection previous).
Stacktrace:
Caused by: java.sql.SQLException
at
org.apache.tomcat.jdbc.pool.ConnectionPool.setupConnection(ConnectionPool.java:351)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:200)
at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:133)
at customer.Database.getConnection(Database.java:67)
... 43 more
Caused by: java.lang.IllegalArgumentException:
org.apache.tomcat.jdbc.pool.PooledConnection is not an interface
at
java.base/java.lang.reflect.Proxy$ProxyBuilder.validateProxyInterfaces(Proxy.java:691)
at
java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Proxy.java:630)
at
java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$1(Proxy.java:428)
at
java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
at
java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
at
java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:426)
at java.base/java.lang.reflect.Proxy.getProxyClass(Proxy.java:386)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.getProxyConstructor(ConnectionPool.java:370)
at
org.apache.tomcat.jdbc.pool.ConnectionPool.setupConnection(ConnectionPool.java:339)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 67664] IllegalArgumentException in ConnectionPool.getProxyConstructor
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67664
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ronald.dehuysser@gmail.com
--- Comment #5 from Remy Maucherat <re...@apache.org> ---
*** Bug 67757 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 67664] IllegalArgumentException in ConnectionPool.getProxyConstructor
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67664
Konstantin Kolinko <kn...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |regression
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 67664] IllegalArgumentException in ConnectionPool.getProxyConstructor
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67664
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |radicr@gmail.com
--- Comment #4 from Remy Maucherat <re...@apache.org> ---
*** Bug 67697 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 67664] IllegalArgumentException in ConnectionPool.getProxyConstructor
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67664
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- 11.0.x with 11.0.0-M13 onwards
- 10.1.x with 10.1.15 onwards
- 9.0.x with 9.0.82 onwards
- 8.5.x with 8.5.94 onwards
Until those releases are available, you can use the tomcat-jdbc.jar from the
previous release.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 67664] IllegalArgumentException in ConnectionPool.getProxyConstructor
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67664
--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> ---
(In reply to Mark Thomas from comment #1)
> Fixed in:
> - 8.5.x with 8.5.94 onwards
Correction: The above should be "with 8.5.95 onwards".
(Tomcat 8.5.94 had already been tagged when this issue was fixed.)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 67664] IllegalArgumentException in ConnectionPool.getProxyConstructor
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67664
--- Comment #2 from tza@silbergrau.com ---
Thanks for the fast reply!
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org