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 10:19:24 UTC

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

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