You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "funtower (via GitHub)" <gi...@apache.org> on 2023/12/19 16:18:58 UTC

[I] Not compatible to Oracle12C [shardingsphere]

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

   ## Bug Report
   	
   I use Springboot2.7.18 + oracle12C + ojdbc12.2.0.1 + shardingsphere-jdbc-core 5.4.1 + mybatis-plus
   
   ### Which version of ShardingSphere did you use?
   ```xml
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-jdbc-core</artifactId>
               <version>5.4.1</version>
           </dependency>
   ```
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
            ShardingSphere-JDBC 
   ### Expected behavior
            Running start
   ### Actual behavior
            Throw Exception such as:
   Caused by: org.apache.shardingsphere.infra.exception.TableNotExistsException: Table or view `system_sd_demo` does not exist.
   	at org.apache.shardingsphere.infra.binder.segment.from.impl.SimpleTableSegmentBinder.lambda$checkTableExists$4(SimpleTableSegmentBinder.java:146)
   	at org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:41)
   	at org.apache.shardingsphere.infra.binder.segment.from.impl.SimpleTableSegmentBinder.checkTableExists(SimpleTableSegmentBinder.java:143)
   	at org.apache.shardingsphere.infra.binder.segment.from.impl.SimpleTableSegmentBinder.bind(SimpleTableSegmentBinder.java:82)
   	at org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementBinder.lambda$bind$0(InsertStatementBinder.java:58)
   	at java.util.Optional.ifPresent(Optional.java:159)
   	at org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementBinder.bind(InsertStatementBinder.java:58)
   	at org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementBinder.bind(InsertStatementBinder.java:48)
   	at org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bindDMLStatement(SQLBindEngine.java:103)
   	at org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bind(SQLBindEngine.java:80)
   	at org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bind(SQLBindEngine.java:71)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:202)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:167)
   	at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:83)
   ### Reason analyze (If you can)
          not compatible to Oracle schemas metadata
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   sharding-configy.ymal
   ```yaml
   dataSources:
     shardingmaster:
   #    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       dataSourceClassName: com.alibaba.druid.pool.DruidDataSource
       driverClassName: oracle.jdbc.driver.OracleDriver
       jdbcUrl: jdbc:oracle:thin:@ip:port:xe
       url: jdbc:oracle:thin:@ip:port:xe
       username: xxx
       password: xxx
     shardingslave0:
   #    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       dataSourceClassName: com.alibaba.druid.pool.DruidDataSource
       driverClassName: oracle.jdbc.driver.OracleDriver
       jdbcUrl: jdbc:oracle:thin:@ip:port:xe
       url: jdbc:oracle:thin:@ip:port:xe
       username: xxx
       password: xxx
     shardingslave1:
   #    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       dataSourceClassName: com.alibaba.druid.pool.DruidDataSource
       driverClassName: oracle.jdbc.driver.OracleDriver
       jdbcUrl: jdbc:oracle:thin:@ip:port:xe
       url: jdbc:oracle:thin:@ip:port:xe
       username: xxx
       password: xxx
   
   rules:
   - !SHARDING
     tables:
       system_sd_demo:
         actualDataNodes: shardingmaster.system_sd_demo_$->{0..2}
         tableStrategy:
           standard:
             shardingColumn: id
             shardingAlgorithmName: demo_inline
         keyGenerateStrategy:
           column: id
           keyGeneratorName: demo_snowflake
     shardingAlgorithms:
       demo_inline:
         type: INLINE
         props:
           algorithm-expression: system_sd_demo_$->{id % 3}
           allow-range-query-with-inline-sharding: true
     keyGenerators:
       demo_snowflake:
         type: SNOWFLAKE
   - !READWRITE_SPLITTING
     dataSources:
       demo_readwrite_data_sources:
         writeDataSourceName: shardingmaster
         readDataSourceNames:
           - shardingslave0
           - shardingslave1
         loadBalancerName: demo_load_balance_algorithm
     loadBalancers:
       demo_load_balance_algorithm:
         type: ROUND_ROBIN
   - !SINGLE
     tables:
       - "*.*"
   
   props:
     sql-show: true
   ```
   DDL 
   ```sql
   CREATE TABLE  "SYSTEM_SD_DEMO_0" 
      (	"ID" NUMBER(20,0) NOT NULL ENABLE, 
   	"NAME" NVARCHAR2(30), 
   	"CREATOR" NVARCHAR2(64), 
   	"CREATE_TIME" DATE NOT NULL ENABLE, 
   	"UPDATER" NVARCHAR2(64), 
   	"UPDATE_TIME" DATE NOT NULL ENABLE, 
   	"TENANT_ID" NUMBER(20,0) NOT NULL ENABLE, 
   	"DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE
      );
      CREATE TABLE  "SYSTEM_SD_DEMO_2" 
      (	"ID" NUMBER(20,0) NOT NULL ENABLE, 
   	"NAME" NVARCHAR2(30), 
   	"CREATOR" NVARCHAR2(64), 
   	"CREATE_TIME" DATE NOT NULL ENABLE, 
   	"UPDATER" NVARCHAR2(64), 
   	"UPDATE_TIME" DATE NOT NULL ENABLE, 
   	"TENANT_ID" NUMBER(20,0) NOT NULL ENABLE, 
   	"DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE
      );
      CREATE TABLE  "SYSTEM_SD_DEMO_2" 
      (	"ID" NUMBER(20,0) NOT NULL ENABLE, 
   	"NAME" NVARCHAR2(30), 
   	"CREATOR" NVARCHAR2(64), 
   	"CREATE_TIME" DATE NOT NULL ENABLE, 
   	"UPDATER" NVARCHAR2(64), 
   	"UPDATE_TIME" DATE NOT NULL ENABLE, 
   	"TENANT_ID" NUMBER(20,0) NOT NULL ENABLE, 
   	"DELETED" NUMBER(1,0) DEFAULT 0 NOT NULL ENABLE
      );
   ```
   
   


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


Re: [I] Not compatible to Oracle12C [shardingsphere]

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

   > @funtower DDL是通过ShardingSphere-JDBC执行还是直接在Oracle DB中执行?
   
   This is the ordinary list building sentence, can be executed directly in the oracle database


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


Re: [I] Not compatible to Oracle12C [shardingsphere]

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

   @wuwen5 
   Thank you for your sharing!


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


Re: [I] Not compatible to Oracle12C [shardingsphere]

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

   @funtower 
   Is the DDL executed via ShardingSphere-JDBC or directly in Oracle DB?


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


Re: [I] Not compatible to Oracle12C [shardingsphere]

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

   I think this is a case sensitive issue with table names.
   
   > TableNotExistsException: Table or view system_sd_demo does not exist.
   
    > CREATE TABLE  "SYSTEM_SD_DEMO_0" 
   
   In the exception log, it is lowercase, while in the `DDL` statement, it is uppercase.
   
   This SQL can be used to confirm case sensitive configurations
   `SELECT *
   FROM nls_database_parameters
   WHERE parameter IN ('NLS_SORT', 'NLS_COMP');`
   
   `SELECT OWNER AS TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, NULLABLE, DATA_TYPE, COLUMN_ID, HIDDEN_COLUMN , IDENTITY_COLUMN, COLLATION 
   FROM ALL_TAB_COLS WHERE  
   TABLE_NAME in  ('system_sd_demo_0' )
   ORDER BY COLUMN_ID
   `
   


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


Re: [I] Not compatible to Oracle12C [shardingsphere]

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

   > > @funtower DDL是通过ShardingSphere-JDBC执行还是直接在Oracle DB中执行?
   > 
   > This is the ordinary list building sentence, can be executed directly in the oracle database
   
   Since the log you provided shows `Table or view system_sd_demo does not exist`, I asked how your DDL is executed.


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


Re: [I] Not compatible to Oracle12C [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #29463: Not compatible to Oracle12C
URL: https://github.com/apache/shardingsphere/issues/29463


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


Re: [I] Not compatible to Oracle12C [shardingsphere]

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

   Closed due to no response.
   If this problem persists, please reopen it or submit a new one.


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


Re: [I] Not compatible to Oracle12C [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #29463:
URL: https://github.com/apache/shardingsphere/issues/29463#issuecomment-1902253428

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


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