gdut-yy opened a new issue, #34444:
URL: https://github.com/apache/shardingsphere/issues/34444

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   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.
   
   ```
   org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration': 
Initialization of bean failed; nested exception is 
java.lang.IllegalArgumentException: argument type mismatch
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:405)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:258)
 ~[spring-context-5.3.31.jar:5.3.31]
        at 
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:773)
 ~[spring-context-5.3.31.jar:5.3.31]
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:575)
 ~[spring-context-5.3.31.jar:5.3.31]
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
 ~[spring-boot-2.7.18.jar:2.7.18]
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) 
[spring-boot-2.7.18.jar:2.7.18]
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409)
 [spring-boot-2.7.18.jar:2.7.18]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:308) 
[spring-boot-2.7.18.jar:2.7.18]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1300) 
[spring-boot-2.7.18.jar:2.7.18]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1289) 
[spring-boot-2.7.18.jar:2.7.18]
        at 
com.example.sdjdbc512.Sdjdbc512Application.main(Sdjdbc512Application.java:10) 
[classes/:na]
   Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[na:1.8.0_322]
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[na:1.8.0_322]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:1.8.0_322]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_322]
        at 
org.apache.shardingsphere.infra.datasource.pool.creator.DataSourceReflection.setField(DataSourceReflection.java:144)
 ~[shardingsphere-infra-common-5.1.2.jar:5.1.2]
        at 
org.apache.shardingsphere.infra.datasource.pool.creator.DataSourceReflection.lambda$setField$0(DataSourceReflection.java:123)
 ~[shardingsphere-infra-common-5.1.2.jar:5.1.2]
        at java.util.Optional.ifPresent(Optional.java:159) ~[na:1.8.0_322]
        at 
org.apache.shardingsphere.infra.datasource.pool.creator.DataSourceReflection.setField(DataSourceReflection.java:123)
 ~[shardingsphere-infra-common-5.1.2.jar:5.1.2]
        at 
org.apache.shardingsphere.infra.datasource.pool.creator.DataSourcePoolCreator.setConfiguredFields(DataSourcePoolCreator.java:126)
 ~[shardingsphere-infra-common-5.1.2.jar:5.1.2]
        at 
org.apache.shardingsphere.infra.datasource.pool.creator.DataSourcePoolCreator.create(DataSourcePoolCreator.java:79)
 ~[shardingsphere-infra-common-5.1.2.jar:5.1.2]
        at 
org.apache.shardingsphere.spring.boot.datasource.DataSourceMapSetter.getDataSource(DataSourceMapSetter.java:92)
 ~[shardingsphere-jdbc-spring-boot-starter-infra-5.1.2.jar:5.1.2]
        at 
org.apache.shardingsphere.spring.boot.datasource.DataSourceMapSetter.getDataSourceMap(DataSourceMapSetter.java:65)
 ~[shardingsphere-jdbc-spring-boot-starter-infra-5.1.2.jar:5.1.2]
        at 
org.apache.shardingsphere.spring.boot.ShardingSphereAutoConfiguration.setEnvironment(ShardingSphereAutoConfiguration.java:122)
 ~[shardingsphere-jdbc-core-spring-boot-starter-5.1.2.jar:5.1.2]
        at 
org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:110)
 ~[spring-context-5.3.31.jar:5.3.31]
        at 
org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:102)
 ~[spring-context-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
 ~[spring-beans-5.3.31.jar:5.3.31]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
 ~[spring-beans-5.3.31.jar:5.3.31]
        ... 24 common frames omitted
   ```
   
   ### Reason analyze (If you can)
   
   `commons-dbcp` added overloaded method 
`org.apache.commons.dbcp2.BasicDataSource#setRemoveAbandonedTimeout(java.time.Duration)`
 since `2.10.0`.
   
   But 
`org.apache.shardingsphere.infra.datasource.pool.creator.DataSourceReflection#setField(java.lang.reflect.Method,
 java.lang.Object)` doesn't support `java.time.Duration` parameter of type,will 
cause `java.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]()


-- 
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-unsubscr...@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to