clay-f commented on issue #28019:
URL: 
https://github.com/apache/shardingsphere/issues/28019#issuecomment-1673312473

   same error here. I'm learn about latest shardingsphere-jdbc and do some test 
follow tutorial can't get running
       
       uncategorized SQLException; SQL state [HY000]; error code [30000]; 
Unknown exception: null
   
   read document from 
[t_order](https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/sharding/)
   
   config.yml
   
       mode:
         type: Standalone
         repository:
           type: JDBC
       
       schemaName: SCOTT
       
       dataSources:
         ds_0:
           dataSourceClassName: com.zaxxer.hikari.HikariDataSource
           driverClassName: oracle.jdbc.OracleDriver
           jdbcUrl: jdbc:oracle:thin:@//127.0.0.1:1521/orcl
           username: scott
           password: 123456
       
       rules:
         - !SINGLE
           tables:
             - "*.*"
           defaultDataSource: db_0
         - !SHARDING
           tables:
             t_order:
               actualDataNodes: ds_0.t_order_$->{0..1}
               tableStrategy:
                 standard:
                   shardingColumn: id
                   shardingAlgorithmName: t_order_inline
           bindingTables:
             - t_order
           defaultDatabaseStrategy:
             standard:
               shardingColumn: id
               shardingAlgorithmName: database_inline
           defaultTableStrategy:
             none:
       
           shardingAlgorithms:
             database_inline:
               type: INLINE
               props:
                 algorithm-expression: ds_0->{id % 2}
             t_order_inline:
               type: INLINE
               props:
                 algorithm-expression: t_order_$->{id % 2}
       
       props:
         sql-show: true
   
   application.yml
   
   
       spring:
         datasource:
           driver-class-name: 
org.apache.shardingsphere.driver.ShardingSphereDriver
           url: jdbc:shardingsphere:classpath:config.yml
       
         main:
           banner-mode: off
       
       mybatis:
         type-aliases-package: com.f.sharedingjdbc.domain
         mapper-locations: classpath:mapper/*.xml
       
       logging:
         level:
           com.f.sharedingjdbc.mapper: debug
   
   
   order table sql xml file 
   
           <?xml version="1.0" encoding="UTF-8" ?>
           <!DOCTYPE mapper
                   PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                   "http://mybatis.org/dtd/mybatis-3-mapper.dtd";>
           <mapper namespace="com.f.sharedingjdbc.mapper.OrderMapper">
           
               <select id="list" resultType="com.f.sharedingjdbc.domain.TOrder">
                  SELECT * FROM t_order
               </select>
           </mapper>
   
   database have three table used for test query
   1. t_order
   2. t_order_0
   3. t_order_1
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

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

Reply via email to