xiancong1229 opened a new issue, #28480: URL: https://github.com/apache/shardingsphere/issues/28480
## Bug Report Method **ShardingSphereDataSourceFactory.createDataSource(final Map<String, DataSource> dataSourceMap, final Collection<RuleConfiguration> configs, final Properties props)** has a probability of IllegalArgumentException:argument type mismatch error class : DataSourcePoolReflection.class error line : <img width="660" alt="image" src="https://github.com/apache/shardingsphere/assets/97492999/b298165f-1b78-4585-9cfe-f37e02ec8f14"> ### Which version of ShardingSphere did you use? <dependency> <groupId>org.apache.shardingsphere</groupId> <artifactId>shardingsphere-jdbc-core</artifactId> <version>5.2.0</version> </dependency> alibaba druid 1.2.2 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-JDBC ### Reason analyze The reason is because DruidAbstractDataSource has two methods with the same name setDbType <img width="705" alt="image" src="https://github.com/apache/shardingsphere/assets/97492999/b1983e35-9448-4241-9987-3f82f1aa98dd"> But DataSourcePoolReflection.findSetterMethod() will only return one of them <img width="942" alt="image" src="https://github.com/apache/shardingsphere/assets/97492999/e59ffe26-8c51-42a5-9c58-c064610d116a"> <img width="455" alt="image" src="https://github.com/apache/shardingsphere/assets/97492999/6cce543b-a6a9-472e-a9e9-3c26735ecab9"> The elements returned by class.getMethod() in jdk are not sorted <img width="498" alt="image" src="https://github.com/apache/shardingsphere/assets/97492999/693b66e8-0589-4d02-91b1-9bdfa41c27e2"> So in DataSourcePoolReflection.findSetterMethod(), should we determine whether the ParameterType is the same type? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
