climy007 opened a new issue #15086:
URL: https://github.com/apache/shardingsphere/issues/15086


   ##springboot version##
   2.1.3
   ##sharding-jdbc version
   5.0.0
   ##Exception Stack##
   `2022-01-26 14:43:35.276 ERROR 85603 logTag:  bizID:  errCode: traceID: --- 
[           main] o.s.boot.SpringApplication               : Application run 
failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'goodsController': Unsatisfied dependency expressed 
through field 'goodsMapper'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'goodsMapper' defined in file 
[/****/common/mapper/GoodsMapper.class]: Unsatisfied dependency expressed 
through bean property 'sqlSessionFactory'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'sqlSessionFactory' defined in class path resource 
[org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: 
Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 
0; nested exception is org.springframework.beans.factory.BeanCreationException
 : Error creating bean with name 'dataSource' defined in class path resource 
[org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.class]: 
Initialization of bean failed; nested exception is 
org.springframework.aop.framework.AopConfigException: Could not generate CGLIB 
subclass of class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource: 
Common causes of this problem include using a final class or a non-visible 
class; nested exception is java.lang.IllegalArgumentException: Cannot subclass 
final class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource
        at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596)
        at 
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)
        at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1395)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849)
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
        at ****.web.Application.main(Application.java:58)
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'goodsMapper' defined in file 
[/****/common/mapper/GoodsMapper.class]: Unsatisfied dependency expressed 
through bean property 'sqlSessionFactory'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'sqlSessionFactory' defined in class path resource 
[org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: 
Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 
0; nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'dataSource' defined in class path resource 
[org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.class]: 
Initialization of bean failed; nested exception is 
org.springframework.aop.framework.AopConfigException: Could not generate CGLIB 
subclass of class org.apache.shardingsphere.driver.jdbc.core.
 datasource.ShardingSphereDataSource: Common causes of this problem include 
using a final class or a non-visible class; nested exception is 
java.lang.IllegalArgumentException: Cannot subclass final class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1499)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1379)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at 
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167)
        at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593)
        ... 17 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'sqlSessionFactory' defined in class path 
resource 
[org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: 
Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 
0; nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'dataSource' defined in class path resource 
[org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.class]: 
Initialization of bean failed; nested exception is 
org.springframework.aop.framework.AopConfigException: Could not generate CGLIB 
subclass of class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource: 
Common causes of this problem include using a final class or a non-visible 
class; nested exception is java.lang.IllegalArgumentException: Cannot subclass 
final class org.apache.shardingsphere.driver.jdbc.core.datasource.Shardi
 ngSphereDataSource
        at 
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1305)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1144)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at 
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1484)
        ... 28 common frames omitted
   Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'dataSource' defined in class path resource 
[org/apache/shardingsphere/spring/boot/ShardingSphereAutoConfiguration.class]: 
Initialization of bean failed; nested exception is 
org.springframework.aop.framework.AopConfigException: Could not generate CGLIB 
subclass of class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource: 
Common causes of this problem include using a final class or a non-visible 
class; nested exception is java.lang.IllegalArgumentException: Cannot subclass 
final class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
        at 
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167)
        at 
org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
        at 
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
        ... 41 common frames omitted
   Caused by: org.springframework.aop.framework.AopConfigException: Could not 
generate CGLIB subclass of class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource: 
Common causes of this problem include using a final class or a non-visible 
class; nested exception is java.lang.IllegalArgumentException: Cannot subclass 
final class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource
        at 
org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:208)
        at 
org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:110)
        at 
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:471)
        at 
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:350)
        at 
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:299)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:429)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1766)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
        ... 51 common frames omitted
   Caused by: java.lang.IllegalArgumentException: Cannot subclass final class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource
        at 
org.springframework.cglib.proxy.Enhancer.generateClass(Enhancer.java:657)
        at 
org.springframework.cglib.transform.TransformingClassGenerator.generateClass(TransformingClassGenerator.java:33)
        at 
org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
        at 
org.springframework.aop.framework.CglibAopProxy$ClassLoaderAwareUndeclaredThrowableStrategy.generate(CglibAopProxy.java:1007)
        at 
org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:358)
        at org.springframework.cglib.proxy.Enhancer.generate(Enhancer.java:582)
        at 
org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:110)
        at 
org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:108)
        at 
org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
        at 
org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
        at 
org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:134)
        at 
org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:319)
        at 
org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:569)
        at 
org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:416)
        at 
org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:58)
        at 
org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205)
        ... 58 common frames omitted
   `


-- 
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]


Reply via email to