You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "lefthand250 (via GitHub)" <gi...@apache.org> on 2023/04/17 07:06:38 UTC

[GitHub] [shardingsphere] lefthand250 opened a new issue, #25191: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294

lefthand250 opened a new issue, #25191:
URL: https://github.com/apache/shardingsphere/issues/25191

   Hi, I have some question about ShardingSphere-JDBC
   this is my deploy
   <dependency>
   	    <groupId>org.apache.shardingsphere</groupId>
   	    <artifactId>shardingsphere-jdbc-core</artifactId>
   	    <version>5.3.0</version>
   	    
   	</dependency>
   	<!-- DataSource pool -->
   	<dependency>
           <groupId>com.alibaba</groupId>
           <artifactId>druid</artifactId>
           <version>1.1.23</version>
       </dependency>
       <!-- Overriding spring-start-web managed version 1.17 for snakeyaml-->
   	<dependency>
           <groupId>org.yaml</groupId>
           <artifactId>snakeyaml</artifactId>
           <version>1.33</version>
       </dependency>
   
   
   this is my application.yml
   spring:
     application:
       name: hos-inventory
     datasource:
       driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
       url: jdbc:shardingsphere:classpath:datasource.yml
   
   this is my datasource.yml
   databaseName: master
   mode:
     type: Standalone
     repository:
       type: JDBC
   dataSources:
     master:
       dataSourceClassName: com.alibaba.druid.pool.DruidDataSource
       driverClassName: com.mysql.jdbc.Driver
       jdbcUrl: xxxx
       username: xxxx
       password: xxxx
   rules:
   - !SHARDING
     tables:
       hos_receipt:
         actualDataNodes: master.hos_receipt${0..1}
         tableStrategy:
           inline:
             shardingColumn: id
             algorithmExpression: hos_receipt${id % 2}
         keyGenerator:
           type: SNOWFLAKE
           column: id
       hos_receipt_detail:
         actualDataNodes: master.hos_receipt_detail${0..1}
         tableStrategy:
           inline:
             shardingColumn: fk_receipt_id
             algorithmExpression: hos_receipt_detail${fk_receipt_id % 2}
     bindingTables:
       - hos_receipt,hos_receipt_detail
     defaultDataSourceName: master
     defaultTableStrategy:
       none:
     defaultKeyGenerator:
       type: SNOWFLAKE
       column: id
   props:
     sql.show: true
   
   this is my logs
   
   org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
   ### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: 
   Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294
    in 'reader', line 1, column 1:
       databaseName: master
       ^
   Cannot create property=tables for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration@20cdc1ca
    in 'reader', line 14, column 3:
       - !SHARDING
         ^
   Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
    in 'reader', line 16, column 5:
           hos_receipt:
           ^
   
    in 'reader', line 14, column 1:
       - !SHARDING
       ^
   
   ### The error may exist in file [C:\Project\phyy\ywt3\26-hospital-inventory\target\classes\cn\baiyee\ywt\hos\inventory\sqlmap\PlanMapper.xml]
   ### The error may involve cn.baiyee.ywt.hos.inventory.dao.PlanDao.getAutoPlanWarehouseItemList
   ### The error occurred while executing a query
   ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294
    in 'reader', line 1, column 1:
       databaseName: master
       ^
   Cannot create property=tables for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration@20cdc1ca
    in 'reader', line 14, column 3:
       - !SHARDING
         ^
   Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
    in 'reader', line 16, column 5:
           hos_receipt:
           ^
   
    in 'reader', line 14, column 1:
       - !SHARDING
       ^
   
   	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
   	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
   	at com.sun.proxy.$Proxy113.selectList(Unknown Source)
   	at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
   	at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:139)
   	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:76)
   	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
   	at com.sun.proxy.$Proxy149.getAutoPlanWarehouseItemList(Unknown Source)
   	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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
   	at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:52)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
   	at com.sun.proxy.$Proxy150.getAutoPlanWarehouseItemList(Unknown Source)
   	at cn.baiyee.test.hos.inventory.service.impl.PlanServiceImplTest.testGetAutoPlanWarehouseItemList(PlanServiceImplTest.java:53)
   	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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
   	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
   	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
   	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
   	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
   	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
   	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
   	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
   	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
   	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
   	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
   	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
   	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
   Caused by: org.apache.ibatis.exceptions.PersistenceException: 
   ### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294
    in 'reader', line 1, column 1:
       databaseName: master
       ^
   Cannot create property=tables for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration@20cdc1ca
    in 'reader', line 14, column 3:
       - !SHARDING
         ^
   Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
    in 'reader', line 16, column 5:
           hos_receipt:
           ^
   
    in 'reader', line 14, column 1:
       - !SHARDING
       ^
   
   ### The error may exist in file [C:\Project\phyy\ywt3\26-hospital-inventory\target\classes\cn\baiyee\ywt\hos\inventory\sqlmap\PlanMapper.xml]
   ### The error may involve cn.baiyee.ywt.hos.inventory.dao.PlanDao.getAutoPlanWarehouseItemList
   ### The error occurred while executing a query
   ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294
    in 'reader', line 1, column 1:
       databaseName: master
       ^
   Cannot create property=tables for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration@20cdc1ca
    in 'reader', line 14, column 3:
       - !SHARDING
         ^
   Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
    in 'reader', line 16, column 5:
           hos_receipt:
           ^
   
    in 'reader', line 14, column 1:
       - !SHARDING
       ^
   
   	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
   	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.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
   	... 49 more
   Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294
    in 'reader', line 1, column 1:
       databaseName: master
       ^
   Cannot create property=tables for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration@20cdc1ca
    in 'reader', line 14, column 3:
       - !SHARDING
         ^
   Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
    in 'reader', line 16, column 5:
           hos_receipt:
           ^
   
    in 'reader', line 14, column 1:
       - !SHARDING
       ^
   
   	at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
   	at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
   	at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
   	at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:338)
   	at org.apache.ibatis.executor.ReuseExecutor.prepareStatement(ReuseExecutor.java:88)
   	at org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:59)
   	at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:326)
   	at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
   	at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:143)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
   	at com.sun.proxy.$Proxy450.query(Unknown Source)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
   	... 55 more
   Caused by: java.sql.SQLException: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294
    in 'reader', line 1, column 1:
       databaseName: master
       ^
   Cannot create property=tables for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration@20cdc1ca
    in 'reader', line 14, column 3:
       - !SHARDING
         ^
   Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
    in 'reader', line 16, column 5:
           hos_receipt:
           ^
   
    in 'reader', line 14, column 1:
       - !SHARDING
       ^
   
   	at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:332)
   	at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
   	at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736)
   	at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668)
   	at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
   	at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154)
   	at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
   	at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
   	at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
   	at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
   	at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
   	... 66 more
   Caused by: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294
    in 'reader', line 1, column 1:
       databaseName: master
       ^
   Cannot create property=tables for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration@20cdc1ca
    in 'reader', line 14, column 3:
       - !SHARDING
         ^
   Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
    in 'reader', line 16, column 5:
           hos_receipt:
           ^
   
    in 'reader', line 14, column 1:
       - !SHARDING
       ^
   
   	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:470)
   	at org.apache.shardingsphere.infra.util.yaml.YamlEngine.unmarshal(YamlEngine.java:70)
   	at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:74)
   	at org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.createDataSource(DriverDataSourceCache.java:51)
   	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
   	at org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.get(DriverDataSourceCache.java:45)
   	at org.apache.shardingsphere.driver.ShardingSphereDriver.connect(ShardingSphereDriver.java:51)
   	at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
   	... 76 more
   Caused by: Cannot create property=tables for JavaBean=org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration@20cdc1ca
    in 'reader', line 14, column 3:
       - !SHARDING
         ^
   Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
    in 'reader', line 16, column 5:
           hos_receipt:
           ^
   
   	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.constructSequenceStep2(BaseConstructor.java:469)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequence(BaseConstructor.java:435)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructSequence.construct(Constructor.java:560)
   	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)
   	... 91 more
   Caused by: Cannot create property=tableStrategy for JavaBean=org.apache.shardingsphere.sharding.yaml.config.rule.YamlTableRuleConfiguration@7f1a2307
    in 'reader', line 17, column 7:
             actualDataNodes: master.hos_rece ... 
             ^
   Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
    in 'reader', line 19, column 9:
               inline:
               ^
   
   	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.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:581)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:213)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:557)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:193)
   	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)
   	... 102 more
   Caused by: Cannot create property=inline for JavaBean=org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration@63d2d419
    in 'reader', line 19, column 9:
               inline:
               ^
   Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
    in 'reader', line 20, column 11:
                 shardingColumn: id
                 ^
   
   	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.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:270)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:253)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:299)
   	... 113 more
   Caused by: org.yaml.snakeyaml.error.YAMLException: Unable to find property 'inline' on class: org.apache.shardingsphere.sharding.yaml.config.strategy.sharding.YamlShardingStrategyConfiguration
   	at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:155)
   	at org.yaml.snakeyaml.introspector.PropertyUtils.getProperty(PropertyUtils.java:145)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.getProperty(Constructor.java:337)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:261)
   	... 117 more
   
   I don't know where is wrong.
   Can you please help me figure it out. I would be really grateful.
   
   
   


-- 
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] zkpgds commented on issue #25191: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294

Posted by "zkpgds (via GitHub)" <gi...@apache.org>.
zkpgds commented on issue #25191:
URL: https://github.com/apache/shardingsphere/issues/25191#issuecomment-1556096900

   dataSources:
     ywt159:
       dataSourceClassName: com.alibaba.druid.pool.DruidDataSource
       driverClassName: com.mysql.jdbc.Driver
       jdbcUrl: jdbc:mysql://192.168.1.180:3306/ywt159?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
       username: ywt
       password: welcome1
   rules:
     - !SHARDING
       tables:
         hos_receipt:
           actualDataNodes: ywt159.hos_receipt${0..1}
           tableStrategy:
             standard:
               shardingColumn: id
               shardingAlgorithmName: hos_receipt_detail
       
       shardingAlgorithms:
         hos_receipt_detail:
           type: INLINE
           props:
             algorithm-expression: hos_receipt_detail${id % 2}
   props:
     sql.show: true
   
   try this


-- 
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] TeslaCN commented on issue #25191: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294

Posted by "TeslaCN (via GitHub)" <gi...@apache.org>.
TeslaCN commented on issue #25191:
URL: https://github.com/apache/shardingsphere/issues/25191#issuecomment-1510897568

   
   It seems that your format is incorrect. Here is an example of my configuration.
   
   ```yaml
   rules:
   - !SHARDING
     tables:
       t_order_item:
         actualDataNodes: ds.t_order_item_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_item_inline
   
     shardingAlgorithms:
       t_order_item_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_item_${order_id % 2}
   ```


-- 
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] zkpgds commented on issue #25191: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294

Posted by "zkpgds (via GitHub)" <gi...@apache.org>.
zkpgds commented on issue #25191:
URL: https://github.com/apache/shardingsphere/issues/25191#issuecomment-1556097187

   ![image](https://github.com/apache/shardingsphere/assets/3361961/06ec22d0-fc7b-4d28-a6c3-bdcd1b40123f)
   


-- 
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] lefthand250 commented on issue #25191: Cannot create property=rules for JavaBean=org.apache.shardingsphere.infra.yaml.config.pojo.YamlRootConfiguration@2c8f294

Posted by "lefthand250 (via GitHub)" <gi...@apache.org>.
lefthand250 commented on issue #25191:
URL: https://github.com/apache/shardingsphere/issues/25191#issuecomment-1511080173

   > It seems that your format is incorrect. Here is an example of my configuration.
   > 
   > ```yaml
   > rules:
   > - !SHARDING
   >   tables:
   >     t_order_item:
   >       actualDataNodes: ds.t_order_item_${0..1}
   >       tableStrategy:
   >         standard:
   >           shardingColumn: order_id
   >           shardingAlgorithmName: t_order_item_inline
   > 
   >   shardingAlgorithms:
   >     t_order_item_inline:
   >       type: INLINE
   >       props:
   >         algorithm-expression: t_order_item_${order_id % 2}
   > ```
   Thanks for your reply,I changed my datasource.yml as you said. But another error appears.
   Here is the logs.
   Caused by: java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:h2:mem:config;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
   	at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:88)
   	at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:318)
   	at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:108)
   	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:99)
   	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:94)
   	at org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.init(JDBCRepository.java:67)
   	at org.apache.shardingsphere.infra.util.spi.type.required.RequiredSPIRegistry.getRegisteredService(RequiredSPIRegistry.java:45)
   	at org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepositoryFactory.getInstance(StandalonePersistRepositoryFactory.java:44)
   	at org.apache.shardingsphere.mode.manager.standalone.StandaloneContextManagerBuilder.build(StandaloneContextManagerBuilder.java:44)
   	at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.createContextManager(ShardingSphereDataSource.java:76)
   	at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.<init>(ShardingSphereDataSource.java:64)
   	at org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory.createDataSource(ShardingSphereDataSourceFactory.java:93)
   	at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:133)
   	at org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:75)
   	at org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.createDataSource(DriverDataSourceCache.java:51)
   	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
   	at org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.get(DriverDataSourceCache.java:45)
   	at org.apache.shardingsphere.driver.ShardingSphereDriver.connect(ShardingSphereDriver.java:51)
   	at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
   	... 76 more
   Caused by: java.sql.SQLException: No suitable driver
   	at java.sql.DriverManager.getDriver(DriverManager.java:315)
   	at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:81)
   
   


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