DataSourceReflection#setField()
will cause IllegalArgumentException: argument type mismatch
when used with commons-dbcp
>= 2.10.0
#34444
Milestone
Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
5.1.x ~ 5.5.x
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
Application run successful.
Actual behavior
Application run failed.
Reason analyze (If you can)
commons-dbcp
added overloaded methodorg.apache.commons.dbcp2.BasicDataSource#setRemoveAbandonedTimeout(java.time.Duration)
since2.10.0
.But
org.apache.shardingsphere.infra.datasource.pool.creator.DataSourceReflection#setField(java.lang.reflect.Method, java.lang.Object)
doesn't supportjava.time.Duration
parameter of type,will causejava.lang.IllegalArgumentException: argument type mismatch
.Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Startup the following sample code.
Example codes for reproduce this issue (such as a github link).
code
The text was updated successfully, but these errors were encountered: