dengjin001 opened a new issue #9584:
URL: https://github.com/apache/shardingsphere/issues/9584


   yml:
   `server:
     port: ${random.int(8000,9000)}
   spring:
     application:
       name: jdt_assetOrder
     aop:
       proxy-target-class: true
     shardingsphere:
       datasource:
         common:
           driver-class-name: com.mysql.cj.jdbc.Driver
           type: com.zaxxer.hikari.HikariDataSource
           username: root
           password: htmj123456
         master1:
           jdbc-url: 
jdbc:mysql://192.168.0.136:3306/xxx?characterEncoding=utf-8&serverTimezone=GMT%2B8
         slave0:
           jdbc-url: 
jdbc:mysql://192.168.0.136:3306/xxx?characterEncoding=utf-8&serverTimezone=GMT%2B8
         slave1:
           jdbc-url: 
jdbc:mysql://192.168.0.136:3306/xxx?characterEncoding=utf-8&serverTimezone=GMT%2B8
         names: master1,slave0,slave1
       enabled: true
       rules:
         replica-query:
           data-sources:
             ds:
               load-balancer-name: ROUND_ROBIN
               primary-data-source-name: master1
               replica-data-source-names:
                 - slave0
                 - slave1
           load-balancers:
             round-robin:
               type: ROUND_ROBIN
               props:
                 sql-show: true
   
   
     redis:
       host: 192.168.0.136
       port: 6379
       database: 2
       lettuce:
         pool:
           max-active: 8
           max-idle: 8
           max-wait: -1
           min-idle: 0
       password: htmj123456
       timeout: 6000
   
   
   
   
   dubbo:
     registry:
       address: nacos://192.168.0.154:8848
       username: nacos
       password: nacos
       simplified: true
     application:
       name: jdt-assetOrder
     protocol:
       port: -1
       id: dubbo
     scan:
       base-packages: com.htmj
     consumer:
       check: false
       timeout: 6000
     provider:
       timeout: 3000
   
   nacos:
     config:
       server-addr: 192.168.0.154:8848
       namespace: 092f199c-2bd3-41e4-b3d7-585cecf5d2ce
       username: nacos
       password: nacos
   mybatis-plus:
     global-config:
       db-config:
         table-underline: true
     configuration:
       log-prefix: dao.
     mapper-locations: classpath:mapper/*.xml
     type-aliases-package: com.htmj.entity
   
   
   seata:
     config:
       type: nacos
       nacos:
         server-addr: 192.168.0.154:8848
         username: nacos
         password: nacos
     application-id: jdt_assetOrder
     tx-service-group: jdt_assetOrder
   
   management:
     endpoints:
       web:
         exposure:
           include: '*'
     metrics:
       tags: { application,'${spring.application.name}' }
     health:
       db:
         enabled: false
   pagehelper:
     page-size-zero: true`
   
   resources/seate.conf:
   `client {
       application.id = jdt_assetOrder
       transaction.service.group = jdt_assetOrder
   }`
   
   
   error message:
   `021-03-04 10:44:37.849 [main] INFO  
org.apache.catalina.core.StandardService -Starting service [Tomcat]
   2021-03-04 10:44:37.849 [main] INFO  org.apache.catalina.core.StandardEngine 
-Starting Servlet engine: [Apache Tomcat/9.0.35]
   2021-03-04 10:44:37.989 [main] INFO  
o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] -Initializing Spring embedded 
WebApplicationContext
   2021-03-04 10:44:37.989 [main] INFO  
org.springframework.web.context.ContextLoader -Root WebApplicationContext: 
initialization completed in 4630 ms
   2021-03-04 10:44:39.527 [main] INFO  
o.s.scheduling.concurrent.ThreadPoolTaskExecutor -Initializing ExecutorService 
'applicationTaskExecutor'
   2021-03-04 10:44:39.893 [main] INFO  com.zaxxer.hikari.HikariDataSource 
-HikariPool-1 - Starting...
   2021-03-04 10:44:40.024 [main] INFO  com.zaxxer.hikari.HikariDataSource 
-HikariPool-1 - Start completed.
   2021-03-04 10:44:40.038 [main] INFO  com.zaxxer.hikari.HikariDataSource 
-HikariPool-2 - Starting...
   2021-03-04 10:44:40.047 [main] INFO  com.zaxxer.hikari.HikariDataSource 
-HikariPool-2 - Start completed.
   2021-03-04 10:44:40.048 [main] INFO  com.zaxxer.hikari.HikariDataSource 
-HikariPool-3 - Starting...
   2021-03-04 10:44:40.058 [main] INFO  com.zaxxer.hikari.HikariDataSource 
-HikariPool-3 - Start completed.
   2021-03-04 10:44:40.130 [main] INFO  ShardingSphere-metadata -Loading 53 
tables' meta data for unconfigured tables.
   2021-03-04 10:44:40.133 [main] INFO  ShardingSphere-metadata -Loading 53 
tables' meta data for unconfigured tables.
   2021-03-04 10:44:40.136 [main] INFO  ShardingSphere-metadata -Loading 53 
tables' meta data for unconfigured tables.
   2021-03-04 10:44:40.145 [main] INFO  ShardingSphere-metadata -Loading 53 
tables' meta data for unconfigured tables.
   2021-03-04 10:44:40.148 [main] INFO  ShardingSphere-metadata -Loading 53 
tables' meta data for unconfigured tables.
   2021-03-04 10:44:40.152 [main] INFO  ShardingSphere-metadata -Loading 53 
tables' meta data for unconfigured tables.
   2021-03-04 10:44:40.159 [main] INFO  
o.a.s.infra.context.schema.SchemaContextsBuilder -Load meta data for schema 
logic_db finished, cost 77 milliseconds.
   2021-03-04 10:44:40.206 [main] INFO  
i.s.s.a.datasource.SeataAutoDataSourceProxyCreator -Auto proxy of 
[shardingSphereDataSource]
   2021-03-04 10:44:40.212 [main] INFO  
org.springframework.aop.framework.CglibAopProxy -Unable to proxy 
interface-implementing method [public final void 
org.apache.shardingsphere.driver.jdbc.unsupported.AbstractUnsupportedOperationDataSource.setLoginTimeout(int)
 throws java.sql.SQLException] because it is marked as final: Consider using 
interface-based JDK proxies instead!
   2021-03-04 10:44:40.212 [main] INFO  
org.springframework.aop.framework.CglibAopProxy -Unable to proxy 
interface-implementing method [public final int 
org.apache.shardingsphere.driver.jdbc.unsupported.AbstractUnsupportedOperationDataSource.getLoginTimeout()
 throws java.sql.SQLException] because it is marked as final: Consider using 
interface-based JDK proxies instead!
   2021-03-04 10:44:40.212 [main] INFO  
org.springframework.aop.framework.CglibAopProxy -Unable to proxy 
interface-implementing method [public final java.lang.Object 
org.apache.shardingsphere.driver.jdbc.adapter.WrapperAdapter.unwrap(java.lang.Class)
 throws java.sql.SQLException] because it is marked as final: Consider using 
interface-based JDK proxies instead!
   2021-03-04 10:44:40.212 [main] INFO  
org.springframework.aop.framework.CglibAopProxy -Unable to proxy 
interface-implementing method [public final boolean 
org.apache.shardingsphere.driver.jdbc.adapter.WrapperAdapter.isWrapperFor(java.lang.Class)]
 because it is marked as final: Consider using interface-based JDK proxies 
instead!
   2021-03-04 10:44:40.388 [main] WARN  
o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext -Exception 
encountered during context initialization - cancelling refresh attempt: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'shardingSphereDataSource' defined in class path resource 
[org/apache/shardingsphere/spring/boot/SpringBootConfiguration.class]: 
Initialization of bean failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker': 
Invocation of init method 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 subcla
 ss final class 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource
   2021-03-04 10:44:40.389 [main] INFO  
o.s.scheduling.concurrent.ThreadPoolTaskExecutor -Shutting down ExecutorService 
'applicationTaskExecutor'
   2021-03-04 10:44:40.422 [main] INFO  
o.a.d.c.s.b.f.a.ReferenceAnnotationBeanPostProcessor -class 
org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor
 was destroying!
   2021-03-04 10:44:40.422 [main] INFO  
c.a.n.s.c.a.c.NacosValueAnnotationBeanPostProcessor -class 
com.alibaba.nacos.spring.context.annotation.config.NacosValueAnnotationBeanPostProcessor
 was destroying!
   2021-03-04 10:44:40.422 [main] INFO  
c.a.n.s.b.f.a.AnnotationNacosInjectedBeanPostProcessor -class 
com.alibaba.nacos.spring.beans.factory.annotation.AnnotationNacosInjectedBeanPostProcessor
 was destroying!
   2021-03-04 10:44:40.429 [main] INFO  
org.apache.catalina.core.StandardService -Stopping service [Tomcat]
   2021-03-04 10:44:40.446 [main] INFO  
o.s.b.a.l.ConditionEvaluationReportLoggingListener -
   
   Error starting ApplicationContext. To display the conditions report re-run 
your application with 'debug' enabled.
   2021-03-04 10:44:40.457 [main] ERROR 
org.springframework.boot.SpringApplication -Application run failed
   org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'shardingSphereDataSource' defined in class path resource 
[org/apache/shardingsphere/spring/boot/SpringBootConfiguration.class]: 
Initialization of bean failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 
'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker': 
Invocation of init method 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:603)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
        at com.htmj.AssetOrderApplication.main(AssetOrderApplication.java:22)
   Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 
'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker': 
Invocation of init method 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.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:227)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1155)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:416)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:349)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342)
        at 
org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerPostProcessor.postProcessAfterInitialization(DataSourceInitializerPostProcessor.java:52)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:431)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)
        ... 16 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.getEarlyBeanReference(AbstractAutoProxyCreator.java:240)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getEarlyBeanReference(AbstractAutowireCapableBeanFactory.java:965)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$doCreateBean$1(AbstractAutowireCapableBeanFactory.java:588)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:184)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:164)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:249)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at 
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory$DependencyObjectProvider.getIfUnique(DefaultListableBeanFactory.java:1942)
        at 
org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker.getDataSourceInitializer(DataSourceInitializerInvoker.java:98)
        at 
org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker.afterPropertiesSet(DataSourceInitializerInvoker.java:61)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
        ... 30 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.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
        at 
org.springframework.cglib.core.ClassLoaderAwareGeneratorStrategy.generate(ClassLoaderAwareGeneratorStrategy.java:57)
        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$$$capture(FutureTask.java:266)
        at java.util.concurrent.FutureTask.run(FutureTask.java)
        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:57)
        at 
org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205)
        ... 47 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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to