You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/19 05:26:33 UTC

[GitHub] [shardingsphere] AaronW-BE opened a new issue, #21646: Version 5.2.1 have problem for init

AaronW-BE opened a new issue, #21646:
URL: https://github.com/apache/shardingsphere/issues/21646

   The exception logs following:
   ```
   An attempt was made to call a method that does not exist. The attempt was made from the following location:
   
       org.apache.shardingsphere.infra.util.yaml.constructor.ShardingSphereYamlConstructor$1.<init>(ShardingSphereYamlConstructor.java:44)
   
   The following method did not exist:
   
       org.apache.shardingsphere.infra.util.yaml.constructor.ShardingSphereYamlConstructor$1.setCodePointLimit(I)V
   ```
   In class `ShardingSphereYamlConstructor` its do have a not exist method `setCodePointLimit` in line 44


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


[GitHub] [shardingsphere] pengxianggui commented on issue #21646: Version 5.2.1 have problem for init

Posted by GitBox <gi...@apache.org>.
pengxianggui commented on issue #21646:
URL: https://github.com/apache/shardingsphere/issues/21646#issuecomment-1366556085

   I get the this error after upgrading snakeyaml to 1.33:
   ```
   org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmClient' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/client/AlarmClient.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alarmService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean w
 ith name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.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 [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0;
  nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
   	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
   	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
   	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
   	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
   	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:1226)
   	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
   	at cn.com.asoco.alarm_platform.server.AlarmPlatformApplication.main(AlarmPlatformApplication.java:29)
   Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alarmService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyExcept
 ion: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.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 [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Fa
 iled to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:321)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	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:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 19 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sendConfig' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/send/SendConfig.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/clas
 ses/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.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 [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=o
 rg.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:408)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:453)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:527)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:497)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:650)
   	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:239)
   	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
   	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:318)
   	... 31 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainService' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/service/AlarmDomainService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.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 [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoCo
 nfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	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:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 56 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'alarmDomainMapper' defined in file [/Users/pengxianggui/project/gitlab/asoco-product/asoco-alarm-platform/alarm-server/target/classes/cn/com/asoco/alarm_platform/server/dao/AlarmDomainMapper.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 [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; ne
 sted exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1524)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1404)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	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:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 70 common frames omitted
   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:797)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:538)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	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:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1509)
   	... 82 common frames omitted
   Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingSphereDatasource' defined in class path resource [cn/com/asoco/alarm_platform/server/sharding/ShardingSphereConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:483)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
   	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
   	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
   	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:1307)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)
   	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)
   	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)
   	... 95 common frames omitted
   Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingSphereDatasource' threw exception; nested exception is Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:650)
   	... 109 common frames omitted
   Caused by: org.yaml.snakeyaml.constructor.ConstructorException: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@58a5b69c
    in 'reader', line 2, column 1:
       dataSources:
       ^
   No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
    in 'reader', line 23, column 3:
         broadcastTables: t_alarm_domain  ... 
         ^
   
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:321)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:207)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:358)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:207)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:191)
   	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:477)
   	at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:443)
   	at org.apache.shardingsphere.infra.util.yaml.YamlEngine.unmarshal(YamlEngine.java:55)
   	at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:61)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig.shardingSphereDatasource(ShardingSphereConfig.java:26)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1.CGLIB$shardingSphereDatasource$0(<generated>)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1$$FastClassBySpringCGLIB$$c41430c2.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
   	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
   	at cn.com.asoco.alarm_platform.server.sharding.ShardingSphereConfig$$EnhancerBySpringCGLIB$$23edcc1.shardingSphereDatasource(<generated>)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
   	... 110 common frames omitted
   Caused by: org.yaml.snakeyaml.error.YAMLException: No single argument constructor found for interface org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:417)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.processDuplicateKeys(SafeConstructor.java:108)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:81)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:76)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.constructSet2ndStep(SafeConstructor.java:218)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructSet(BaseConstructor.java:545)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:199)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.newInstance(Constructor.java:333)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:298)
   	... 131 common frames omitted
   ```
   
   This is my config:
   ```yaml
   # shardingsphere 5.3.0文档 https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sharding/
   dataSources:
     db0: # 单数据库节点无意义,当存在多个时用于区分
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource # 数据库连接池全类名
       driverClassName: ${spring.datasource.driver-class-name}
       jdbcUrl: ${spring.datasource.url}
       username: ${spring.datasource.username}
       password: ${spring.datasource.password}
   props:
     sql-show: true
   
   rules:
   - !SHARDING
     broadcastTables: t_alarm_domain # 广播表规则列表
     bindingTables: # 绑定表规则列表。见: https://github.com/apache/shardingsphere/issues/21002
       - t_alarm,t_sensor_alarm
       - t_alarm,t_video_alarm
       - t_alarm,t_device_offline_alarm
       - t_alarm,t_alarm_handle
     tables: # 单分片键的标准分片场景
       t_alarm:
         actualDataNodes: db0.t_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_sensor_alarm:
         actualDataNodes: db0.t_sensor_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_video_alarm:
         actualDataNodes: db0.t_video_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_device_offline_alarm:
         actualDataNodes: db0.t_device_offline_alarm_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
       t_alarm_handle:
         actualDataNodes: db0.t_alarm_handle_$->{2022..2025}
         tableStrategy:
           standard:
             shardingColumns: alarm_time
             shardingAlgorithmName: time-inline
     shardingAlgorithms:
       time-inline:
         type: CLASS_BASED
         props:
           strategy: standard
           algorithmClassName: cn.com.asoco.alarm_platform.server.sharding.AlarmTimeShardingAlgorithm # 使用自定义类实现分片逻辑处理
   
   ```
   
   I don't know why... I was frustrated by the succession of problems I was having. Can anyone help me?


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


[GitHub] [shardingsphere] AaronW-BE commented on issue #21646: Version 5.2.1 have problem for init

Posted by GitBox <gi...@apache.org>.
AaronW-BE commented on issue #21646:
URL: https://github.com/apache/shardingsphere/issues/21646#issuecomment-1284752681

   > 
   
   Got it, Thanks


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


[GitHub] [shardingsphere] MrXionGe commented on issue #21646: Version 5.2.1 have problem for init

Posted by GitBox <gi...@apache.org>.
MrXionGe commented on issue #21646:
URL: https://github.com/apache/shardingsphere/issues/21646#issuecomment-1284286377

   @AaronW-BE 
   The component 'snakeyaml' needs to be upgraded.
   Springboot default 'snakeyaml version = 1.30'
   ```xml
           <dependency>
               <groupId>org.yaml</groupId>
               <artifactId>snakeyaml</artifactId>
               <version>1.33</version>
           </dependency>
   ```


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


[GitHub] [shardingsphere] linghengqian commented on issue #21646: Version 5.2.1 have problem for init

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #21646:
URL: https://github.com/apache/shardingsphere/issues/21646#issuecomment-1283617304

   - This issue is a duplicate of https://github.com/apache/shardingsphere/issues/21476 and should be marked as invalid and closed.  
   
   - If you are using `SpringBoot OSS <3.0.0-M5`, you need to specify the SnakeYAML version manually.


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


[GitHub] [shardingsphere] AaronW-BE closed issue #21646: Version 5.2.1 have problem for init

Posted by GitBox <gi...@apache.org>.
AaronW-BE closed issue #21646: Version 5.2.1 have problem for init
URL: https://github.com/apache/shardingsphere/issues/21646


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


[GitHub] [shardingsphere] AaronW-BE commented on issue #21646: Version 5.2.1 have problem for init

Posted by GitBox <gi...@apache.org>.
AaronW-BE commented on issue #21646:
URL: https://github.com/apache/shardingsphere/issues/21646#issuecomment-1284753113

   @MrXionGe Got it, Thanks a lot


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


[GitHub] [shardingsphere] linghengqian commented on issue #21646: Version 5.2.1 have problem for init

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #21646:
URL: https://github.com/apache/shardingsphere/issues/21646#issuecomment-1366626076

   @pengxianggui 
   - broadcastTables is a YAML 1.1 List, not a YMAL 1.1 Object. use
   ```yaml
   broadcastTables: 
       - t_alarm_domain
   ```


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