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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]