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 02:52:07 UTC

[GitHub] [incubator-shardingsphere] bofale opened a new issue #3445: 启动服务是提示表不存在

bofale opened a new issue #3445: 启动服务是提示表不存在
URL: https://github.com/apache/incubator-shardingsphere/issues/3445
 
 
   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/incubator-shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-core</artifactId>
               <version>4.0.0-RC2</version>
           </dependency>
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   Sharding-JDBC
   ### Expected behavior
   能够获取到表
   ### Actual behavior
   ORA-00942: 表或视图不存在
   ### Reason analyze (If you can)
   我通过查看源码,发现表不存在是因为这个时候shardingsphere会按标准的Oracle SQL语句schema.table 去获取表信息, 而这个schema是根据在设置DataSource时候的url正则获取到的,
   jdbc:oracle:thin:@//localhost:1522/XE ,这个是我连接我本地的url,在shardingsphere的OracleDataSourceMetaData类中会解析上面提到的url得到schema, 这个是源码
   this.schemaName = matcher.group(5);
   所以这里得到的schema就是上面的XE,其实我数据库我没有单独设置schema,缺省用的是我用户名.
   因此就造成了后面根据schema.table去获取表信息的时候提示表不存在
   ### 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).
   

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