You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "xiancong1229 (via GitHub)" <gi...@apache.org> on 2023/09/20 13:40:18 UTC
[GitHub] [shardingsphere] xiancong1229 opened a new issue, #28480: createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource [shardingsphere]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #28480:
URL: https://github.com/apache/shardingsphere/issues/28480#issuecomment-2010032277
- To be honest, I couldn't see any related error reports about druid `dbType` in #30543 . The current issue lacks a unit test that can be explained.
- Closing this issue because it cannot be reproduced.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #28480:
URL: https://github.com/apache/shardingsphere/issues/28480#issuecomment-1986346246
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #28480:
URL: https://github.com/apache/shardingsphere/issues/28480#issuecomment-1773329102
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource [shardingsphere]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #28480:
URL: https://github.com/apache/shardingsphere/issues/28480#issuecomment-1932178835
- I verified at https://github.com/apache/shardingsphere/issues/21211#issuecomment-1932123528 that there is no issue with shardingsphere 5.4.2-SNAPSHOT. Can you provide a git with unit tests?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #28480:
URL: https://github.com/apache/shardingsphere/issues/28480#issuecomment-1925899539
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource [shardingsphere]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian closed issue #28480: createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource
URL: https://github.com/apache/shardingsphere/issues/28480
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] createDataSource method has a probability of IllegalArgumentException when use alibaba druid as datasource [shardingsphere]
Posted by "rogers1994 (via GitHub)" <gi...@apache.org>.
rogers1994 commented on issue #28480:
URL: https://github.com/apache/shardingsphere/issues/28480#issuecomment-1878158015
Hi, Do you solved this problams?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org