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 2019/11/05 03:25:34 UTC
[GitHub] [incubator-shardingsphere] bofale opened a new issue #3446: present
table not exist when start application
bofale opened a new issue #3446: present table not exist when start application
URL: https://github.com/apache/incubator-shardingsphere/issues/3446
Which version of ShardingSphere did you use?
org.apache.shardingsphere sharding-jdbc-core 4.0.0-RC2
Which project did you use? Sharding-JDBC or Sharding-Proxy?
Sharding-JDBC
Oracle info
Oracle 11g
DataSource
HikariDataSource com.zaxxer.HikariCP 3.4.1
Expected behavior
find table info
Actual behavior
ORA-00942: Table or view does not exist
Reason analyze (If you can)
I view source code and know this issue reason. Shardingsphere will get table info with schema.table in db when start application.The schema originate from setup dataSource url.The url as below is my project:
jdbc:oracle:thin:@//localhost:1522/XE ,
I find OracleDataSourceMetaData.class will parse oracle configuration and the code is get schema code as below:
this.schemaName = matcher.group(5);
Finally, this will be combined with the table name to query the table information in the database.
Like this: XE.table.
I don't set a schema for the . My login user name is regarded as default schema.
I try to use this method,
HikariDataSource.setSchema
,but i got an exception.
Caused by: java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.setSchema(Ljava/lang/String;)V
So i think it should be username.table or provide a method to set schema.
BR!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services