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 2021/06/28 12:37:32 UTC

[GitHub] [shardingsphere] yuanhuyulin opened a new issue #11046: 11g or lower of oracle use 5.0.0-beta error

yuanhuyulin opened a new issue #11046:
URL: https://github.com/apache/shardingsphere/issues/11046


    the Class OracleTableMetaDataLoader of module shardingshere-infra-common :
           **    private static final String TABLE_META_DATA_SQL = "SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, IDENTITY_COLUMN %s FROM ALL_TAB_COLUMNS WHERE OWNER = ?";**
   
   database not exists column IDENTITY_COLUMN , Then on start my project that used 5.0.0-beta must be error for "IDENTITY_COLUMN" not exists; on the last it can also error like **org.apache.shardingsphere.infra.exception.ShardingSphereException: `DUAL` single table does not exist.**
   
   
   
   


-- 
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] strongduanmu commented on issue #11046: 11g or lower of oracle use 5.0.0-beta error

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


   Fixed by #10956.


-- 
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] xueshiji commented on issue #11046: 11g or lower of oracle use 5.0.0-beta error

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


   @yuanhuyulin @terrymanu  It has been fixed in https://github.com/apache/shardingsphere/pull/10956


-- 
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] avalon5666 commented on issue #11046: 11g or lower of oracle use 5.0.0-beta error

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


   Can you set sql.show=true, and provider the configuration and full exception log?


-- 
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] yuanhuyulin commented on issue #11046: 11g or lower of oracle use 5.0.0-beta error

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


   the version of oracle info is:
   ![image](https://user-images.githubusercontent.com/86606528/123721636-50bc5000-d8b9-11eb-9e1a-83f90f56f329.png)
   I used Spring-boot+mybatis-plus and my yml of dataSoure is:
       _spring:
     shardingsphere:
       enabled: true
       datasource:
         names: ds0,ds1
         common:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: oracle.jdbc.driver.OracleDriver
         ds0:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: oracle.jdbc.driver.OracleDriver
           url: jdbc:oracle:thin:@10.22.20.14:1521/ORCL
           username: sungl_web
           password: oracle
           maxActive: 800
           initialSize: 5
           maxWait: 60000
           minIdle: 5
           timeBetweenEvictionRunsMillis: 60000
           minEvictableIdleTimeMillis: 300000
           validationQuery: SELECT 1 FROM com_stac
           testWhileIdle: true
           testOnBorrow: false
           testOnReturn: false
             #是否缓存preparedStatement,也就是PSCache。在mysql下建议关闭。 PSCache对支持游标的数据库性能提升巨大,比如说oracle。
           poolPreparedStatements: true
             #要启用PSCache,-1为关闭 必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true  可以把这个数值配置大一些,比如说100
           maxOpenPreparedStatements: 100
             #配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
           filters: stat,wall,log4j2
             #通过connectProperties属性来打开mergeSql功能;慢SQL记录
           connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
             #合并多个DruidDataSource的监控数据
           useGlobalDataSourceStat: false
           loginUsername: druid
           loginPassword: druid
         ds1:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: oracle.jdbc.driver.OracleDriver
           url:  jdbc:oracle:thin:@10.22.20.84:1521/ORCL
           username: dev_sungl_web
           password:  0be6ab3c
           maxActive: 800
           initialSize: 5
           maxWait: 60000
           minIdle: 5
           timeBetweenEvictionRunsMillis: 60000
           minEvictableIdleTimeMillis: 300000
           validationQuery: SELECT 1 FROM com_stac
           testWhileIdle: true
           testOnBorrow: false
           testOnReturn: false
           #是否缓存preparedStatement,也就是PSCache。在mysql下建议关闭。 PSCache对支持游标的数据库性能提升巨大,比如说oracle。
           poolPreparedStatements: false
           #要启用PSCache,-1为关闭 必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true  可以把这个数值配置大一些,比如说100
           maxOpenPreparedStatements: -1
           #配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
           filters: stat,wall,log4j2
           #通过connectProperties属性来打开mergeSql功能;慢SQL记录
           connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
           #合并多个DruidDataSource的监控数据
           useGlobalDataSourceStat: false
           loginUsername: druid
           loginPassword: druid
       #sharding:
       rules:
         sharding:
           tables:
             gla_vchr:
               actual-data-nodes: ds$->{0..1}.gla_vchr$->{0..1}
               database-strategy:
                 standard:
                   sharding-column: dataid
                   sharding-algorithm-name: hash-mod-database
               table-strategy:
                 standard:
                   sharding-column: dataid
                   sharding-algorithm-name: hash-mod
               key-generate-strategy:
                 column: dataid
                 key-generator-name: snowflake
             gla_mult_h:
               actual-data-nodes: ds$->{0..1}.gla_mult_h$->{0..1}
               database-strategy:
                 standard:
                   sharding-column: dataid
                   sharding-algorithm-name: hash-mod-database
               table-strategy:
                 standard:
                   sharding-column: dataid
                   sharding-algorithm-name: hash-mod
               key-generate-strategy:
                 column: dataid
                 key-generator-name: snowflake
           sharding-algorithms:
             hash-mod-database:
               props:
                 sharding-count: "2"
               type: HASH_MOD
             hash-mod:
               props:
                 sharding-count: "10"
               type: HASH_MOD
           key-generators:
             snowflake:
               type: UUID
       props:
         sql.show: true_
   the info of log on start is:
            _2021-06-29 09:01:29.981  INFO 8784 --- [           main] o.a.c.c.StandardEngine                   : Starting Servlet engine: [Apache Tomcat/9.0.26]
   2021-06-29 09:01:30.140  INFO 8784 --- [           main] o.a.c.c.C.[.[.[/]                        : Initializing Spring embedded WebApplicationContext
   2021-06-29 09:01:32.447  INFO 8784 --- [           main] c.a.d.p.DruidDataSource                  : {dataSource-1} inited
   2021-06-29 09:01:32.699  INFO 8784 --- [           main] c.a.d.p.DruidDataSource                  : {dataSource-2} inited
   2021-06-29 09:01:33.808 ERROR 8784 --- [SchemaBuilder-1] d.s.Statement                            : {conn-110005, pstmt-120000} execute error. SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, IDENTITY_COLUMN  FROM ALL_TAB_COLUMNS WHERE OWNER = ? AND TABLE_NAME NOT IN ('gla_mult_h1','gla_mult_h0','gla_vchr1','gla_vchr0','gla_vchr','gla_mult_h')
   
   java.sql.SQLSyntaxErrorException: ORA-00904: "IDENTITY_COLUMN": 标识符无效
   
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:747) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:904) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1082) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1165) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3188) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.wall.WallFilter.preparedStatement_executeQuery(WallFilter.java:648) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:181) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:227) ~[druid-1.1.14.jar:1.1.14]
   	at org.apache.shardingsphere.infra.metadata.schema.builder.loader.dialect.OracleTableMetaDataLoader.loadColumnMetaDataMap(OracleTableMetaDataLoader.java:83) ~[classes/:?]
   	at org.apache.shardingsphere.infra.metadata.schema.builder.loader.dialect.OracleTableMetaDataLoader.loadTableMetaDataMap(OracleTableMetaDataLoader.java:69) ~[classes/:?]
   	at org.apache.shardingsphere.infra.metadata.schema.builder.loader.dialect.OracleTableMetaDataLoader.load(OracleTableMetaDataLoader.java:64) ~[classes/:?]
   	at org.apache.shardingsphere.infra.metadata.schema.builder.SchemaBuilder.lambda$appendDialectRemainTables$1(SchemaBuilder.java:116) ~[classes/:?]
   	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) [?:1.8.0_202]
   	at java.util.concurrent.FutureTask.run(FutureTask.java) [?:1.8.0_202]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_202]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_202]
   	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
   Caused by: oracle.jdbc.OracleDatabaseException: ORA-00904: "IDENTITY_COLUMN": 标识符无效
   
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	... 32 more
   
   2021-06-29 09:01:33.808 ERROR 8784 --- [SchemaBuilder-0] d.s.Statement                            : {conn-10005, pstmt-20002} execute error. SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, IDENTITY_COLUMN  FROM ALL_TAB_COLUMNS WHERE OWNER = ? AND TABLE_NAME NOT IN ('gla_mult_h1','gla_mult_h0','gla_vchr1','gla_vchr0','gla_vchr','gla_mult_h')
   
   java.sql.SQLSyntaxErrorException: ORA-00904: "IDENTITY_COLUMN": 标识符无效
   
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]_
   
    then I used the debug for the Class DialectTableMetaDataLoader error on here :
              _private String getTableMetaDataSQL(final Collection<String> existedTables, final DatabaseMetaData metaData) throws SQLException {
           String collation = metaData.getDatabaseMajorVersion() >= COLLATION_START_MAJOR_VERSION && metaData.getDatabaseMinorVersion() >= COLLATION_START_MINOR_VERSION ? ", COLLATION" : "";
           return existedTables.isEmpty() ? String.format(TABLE_META_DATA_SQL, collation)
                   : String.format(TABLE_META_DATA_SQL_WITH_EXISTED_TABLES, collation, existedTables.stream().map(each -> String.format("'%s'", each)).collect(Collectors.joining(",")));
       }_
    
   and looking for the source of SQL :
           _private static final String TABLE_META_DATA_SQL = "SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, IDENTITY_COLUMN %s FROM ALL_TAB_COLUMNS WHERE OWNER = ?";_
     the column  IDENTITY_COLUMN in the ALL_TAB_COLUMNS not exists in my oracle
   ![image](https://user-images.githubusercontent.com/86606528/123722496-0fc53b00-d8bb-11eb-9ccd-6afde009fd6e.png)
   
   then I alter it by remove select column IDENTITY_COLUMN for this:
             _private static final String TABLE_META_DATA_SQL = "SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE %s FROM ALL_TAB_COLUMNS WHERE OWNER = ?";_
      that is right! but on the last of start  in Class SingleTableRoutingEngine.....:
            
   ![image](https://user-images.githubusercontent.com/86606528/123726360-67b37000-d8c2-11eb-9b8c-025f18d7c820.png)
        so it error like that :
         _2021-06-29 10:09:46.794  INFO 3528 --- [           main] c.s.s.s.SunglScheduleApplication         : =================================sungl-schedule  is started=================================
   2021-06-29 10:09:47.018  INFO 3528 --- [on(6)-127.0.0.1] o.a.c.c.C.[.[.[/]                        : Initializing Spring DispatcherServlet 'dispatcherServlet'
   2021-06-29 10:12:40.273 DEBUG 3528 --- [rRegistryThread] c.s.j.c.t.ExecutorRegistryThread         : >>>>>>>>>>> sun-job registry success, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='executor-schedule', registryValue='http://127.0.0.1:9998/'}, registryResult:ReturnT [code=200, msg=null, content=null]
   2021-06-29 10:12:40.274  WARN 3528 --- [on(4)-127.0.0.1] o.s.b.a.j.DataSourceHealthIndicator      : DataSource health check failed
   
   org.apache.shardingsphere.infra.exception.ShardingSphereException: `DUAL` single table does not exist.
   	at org.apache.shardingsphere.sharding.route.engine.type.single.SingleTablesRoutingEngine.fillRouteContext(SingleTablesRoutingEngine.java:80) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.sharding.route.engine.type.single.SingleTablesRoutingEngine.route(SingleTablesRoutingEngine.java:59) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:61) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:47) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:62) ~[shardingsphere-infra-route-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:52) ~[shardingsphere-infra-route-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:54) ~[shardingsphere-infra-context-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:46) ~[shardingsphere-infra-context-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createExecutionContext(ShardingSphereStatement.java:377) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta]_
       Fortunately, the service has started


-- 
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] avalon5666 commented on issue #11046: 11g or lower of oracle use 5.0.0-beta error

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


   Can you set sql.show=true, and provider the configuration and full exception log?


-- 
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] yuanhuyulin commented on issue #11046: 11g or lower of oracle use 5.0.0-beta error

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


   the version of oracle info is:
   ![image](https://user-images.githubusercontent.com/86606528/123721636-50bc5000-d8b9-11eb-9e1a-83f90f56f329.png)
   I used Spring-boot+mybatis-plus and my yml of dataSoure is:
       _spring:
     shardingsphere:
       enabled: true
       datasource:
         names: ds0,ds1
         common:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: oracle.jdbc.driver.OracleDriver
         ds0:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: oracle.jdbc.driver.OracleDriver
           url: jdbc:oracle:thin:@10.22.20.14:1521/ORCL
           username: sungl_web
           password: oracle
           maxActive: 800
           initialSize: 5
           maxWait: 60000
           minIdle: 5
           timeBetweenEvictionRunsMillis: 60000
           minEvictableIdleTimeMillis: 300000
           validationQuery: SELECT 1 FROM com_stac
           testWhileIdle: true
           testOnBorrow: false
           testOnReturn: false
             #是否缓存preparedStatement,也就是PSCache。在mysql下建议关闭。 PSCache对支持游标的数据库性能提升巨大,比如说oracle。
           poolPreparedStatements: true
             #要启用PSCache,-1为关闭 必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true  可以把这个数值配置大一些,比如说100
           maxOpenPreparedStatements: 100
             #配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
           filters: stat,wall,log4j2
             #通过connectProperties属性来打开mergeSql功能;慢SQL记录
           connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
             #合并多个DruidDataSource的监控数据
           useGlobalDataSourceStat: false
           loginUsername: druid
           loginPassword: druid
         ds1:
           type: com.alibaba.druid.pool.DruidDataSource
           driver-class-name: oracle.jdbc.driver.OracleDriver
           url:  jdbc:oracle:thin:@10.22.20.84:1521/ORCL
           username: dev_sungl_web
           password:  0be6ab3c
           maxActive: 800
           initialSize: 5
           maxWait: 60000
           minIdle: 5
           timeBetweenEvictionRunsMillis: 60000
           minEvictableIdleTimeMillis: 300000
           validationQuery: SELECT 1 FROM com_stac
           testWhileIdle: true
           testOnBorrow: false
           testOnReturn: false
           #是否缓存preparedStatement,也就是PSCache。在mysql下建议关闭。 PSCache对支持游标的数据库性能提升巨大,比如说oracle。
           poolPreparedStatements: false
           #要启用PSCache,-1为关闭 必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true  可以把这个数值配置大一些,比如说100
           maxOpenPreparedStatements: -1
           #配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
           filters: stat,wall,log4j2
           #通过connectProperties属性来打开mergeSql功能;慢SQL记录
           connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
           #合并多个DruidDataSource的监控数据
           useGlobalDataSourceStat: false
           loginUsername: druid
           loginPassword: druid
       #sharding:
       rules:
         sharding:
           tables:
             gla_vchr:
               actual-data-nodes: ds$->{0..1}.gla_vchr$->{0..1}
               database-strategy:
                 standard:
                   sharding-column: dataid
                   sharding-algorithm-name: hash-mod-database
               table-strategy:
                 standard:
                   sharding-column: dataid
                   sharding-algorithm-name: hash-mod
               key-generate-strategy:
                 column: dataid
                 key-generator-name: snowflake
             gla_mult_h:
               actual-data-nodes: ds$->{0..1}.gla_mult_h$->{0..1}
               database-strategy:
                 standard:
                   sharding-column: dataid
                   sharding-algorithm-name: hash-mod-database
               table-strategy:
                 standard:
                   sharding-column: dataid
                   sharding-algorithm-name: hash-mod
               key-generate-strategy:
                 column: dataid
                 key-generator-name: snowflake
           sharding-algorithms:
             hash-mod-database:
               props:
                 sharding-count: "2"
               type: HASH_MOD
             hash-mod:
               props:
                 sharding-count: "10"
               type: HASH_MOD
           key-generators:
             snowflake:
               type: UUID
       props:
         sql.show: true_
   the info of log on start is:
            _2021-06-29 09:01:29.981  INFO 8784 --- [           main] o.a.c.c.StandardEngine                   : Starting Servlet engine: [Apache Tomcat/9.0.26]
   2021-06-29 09:01:30.140  INFO 8784 --- [           main] o.a.c.c.C.[.[.[/]                        : Initializing Spring embedded WebApplicationContext
   2021-06-29 09:01:32.447  INFO 8784 --- [           main] c.a.d.p.DruidDataSource                  : {dataSource-1} inited
   2021-06-29 09:01:32.699  INFO 8784 --- [           main] c.a.d.p.DruidDataSource                  : {dataSource-2} inited
   2021-06-29 09:01:33.808 ERROR 8784 --- [SchemaBuilder-1] d.s.Statement                            : {conn-110005, pstmt-120000} execute error. SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, IDENTITY_COLUMN  FROM ALL_TAB_COLUMNS WHERE OWNER = ? AND TABLE_NAME NOT IN ('gla_mult_h1','gla_mult_h0','gla_vchr1','gla_vchr0','gla_vchr','gla_mult_h')
   
   java.sql.SQLSyntaxErrorException: ORA-00904: "IDENTITY_COLUMN": 标识符无效
   
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:747) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:904) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1082) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1165) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3188) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.wall.WallFilter.preparedStatement_executeQuery(WallFilter.java:648) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:3185) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:181) ~[druid-1.1.14.jar:1.1.14]
   	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:227) ~[druid-1.1.14.jar:1.1.14]
   	at org.apache.shardingsphere.infra.metadata.schema.builder.loader.dialect.OracleTableMetaDataLoader.loadColumnMetaDataMap(OracleTableMetaDataLoader.java:83) ~[classes/:?]
   	at org.apache.shardingsphere.infra.metadata.schema.builder.loader.dialect.OracleTableMetaDataLoader.loadTableMetaDataMap(OracleTableMetaDataLoader.java:69) ~[classes/:?]
   	at org.apache.shardingsphere.infra.metadata.schema.builder.loader.dialect.OracleTableMetaDataLoader.load(OracleTableMetaDataLoader.java:64) ~[classes/:?]
   	at org.apache.shardingsphere.infra.metadata.schema.builder.SchemaBuilder.lambda$appendDialectRemainTables$1(SchemaBuilder.java:116) ~[classes/:?]
   	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) [?:1.8.0_202]
   	at java.util.concurrent.FutureTask.run(FutureTask.java) [?:1.8.0_202]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_202]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_202]
   	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
   Caused by: oracle.jdbc.OracleDatabaseException: ORA-00904: "IDENTITY_COLUMN": 标识符无效
   
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]
   	... 32 more
   
   2021-06-29 09:01:33.808 ERROR 8784 --- [SchemaBuilder-0] d.s.Statement                            : {conn-10005, pstmt-20002} execute error. SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, IDENTITY_COLUMN  FROM ALL_TAB_COLUMNS WHERE OWNER = ? AND TABLE_NAME NOT IN ('gla_mult_h1','gla_mult_h0','gla_vchr1','gla_vchr0','gla_vchr','gla_mult_h')
   
   java.sql.SQLSyntaxErrorException: ORA-00904: "IDENTITY_COLUMN": 标识符无效
   
   	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494) ~[ojdbc8-12.2.0.1.jar:12.2.0.1.0]_
   
    then I used the debug for the Class DialectTableMetaDataLoader error on here :
              _private String getTableMetaDataSQL(final Collection<String> existedTables, final DatabaseMetaData metaData) throws SQLException {
           String collation = metaData.getDatabaseMajorVersion() >= COLLATION_START_MAJOR_VERSION && metaData.getDatabaseMinorVersion() >= COLLATION_START_MINOR_VERSION ? ", COLLATION" : "";
           return existedTables.isEmpty() ? String.format(TABLE_META_DATA_SQL, collation)
                   : String.format(TABLE_META_DATA_SQL_WITH_EXISTED_TABLES, collation, existedTables.stream().map(each -> String.format("'%s'", each)).collect(Collectors.joining(",")));
       }_
    
   and looking for the source of SQL :
           _private static final String TABLE_META_DATA_SQL = "SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, IDENTITY_COLUMN %s FROM ALL_TAB_COLUMNS WHERE OWNER = ?";_
     the column  IDENTITY_COLUMN in the ALL_TAB_COLUMNS not exists in my oracle
   ![image](https://user-images.githubusercontent.com/86606528/123722496-0fc53b00-d8bb-11eb-9ccd-6afde009fd6e.png)
   
   then I alter it by remove select column IDENTITY_COLUMN for this:
             _private static final String TABLE_META_DATA_SQL = "SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE %s FROM ALL_TAB_COLUMNS WHERE OWNER = ?";_
      that is right! but on the last of start  in Class SingleTableRoutingEngine.....:
            
   ![image](https://user-images.githubusercontent.com/86606528/123726360-67b37000-d8c2-11eb-9b8c-025f18d7c820.png)
        so it error like that :
         _2021-06-29 10:09:46.794  INFO 3528 --- [           main] c.s.s.s.SunglScheduleApplication         : =================================sungl-schedule  is started=================================
   2021-06-29 10:09:47.018  INFO 3528 --- [on(6)-127.0.0.1] o.a.c.c.C.[.[.[/]                        : Initializing Spring DispatcherServlet 'dispatcherServlet'
   2021-06-29 10:12:40.273 DEBUG 3528 --- [rRegistryThread] c.s.j.c.t.ExecutorRegistryThread         : >>>>>>>>>>> sun-job registry success, registryParam:RegistryParam{registryGroup='EXECUTOR', registryKey='executor-schedule', registryValue='http://127.0.0.1:9998/'}, registryResult:ReturnT [code=200, msg=null, content=null]
   2021-06-29 10:12:40.274  WARN 3528 --- [on(4)-127.0.0.1] o.s.b.a.j.DataSourceHealthIndicator      : DataSource health check failed
   
   org.apache.shardingsphere.infra.exception.ShardingSphereException: `DUAL` single table does not exist.
   	at org.apache.shardingsphere.sharding.route.engine.type.single.SingleTablesRoutingEngine.fillRouteContext(SingleTablesRoutingEngine.java:80) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.sharding.route.engine.type.single.SingleTablesRoutingEngine.route(SingleTablesRoutingEngine.java:59) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:61) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:47) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:62) ~[shardingsphere-infra-route-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:52) ~[shardingsphere-infra-route-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:54) ~[shardingsphere-infra-context-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:46) ~[shardingsphere-infra-context-5.0.0-beta.jar:5.0.0-beta]
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createExecutionContext(ShardingSphereStatement.java:377) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta]_
       Fortunately, the service has started


-- 
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] strongduanmu closed issue #11046: 11g or lower of oracle use 5.0.0-beta error

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #11046:
URL: https://github.com/apache/shardingsphere/issues/11046


   


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