You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "yuzx88 (via GitHub)" <gi...@apache.org> on 2023/04/27 05:27:27 UTC

[GitHub] [shardingsphere] yuzx88 opened a new issue, #25347: getGeneratedKeys() Oracle ROWID not supported ->Comparable resultSet.getObject(1)

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

   ## 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/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 anymore 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?
   5.1.0
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   ### Expected behavior
   insert data
   ### Actual behavior
   Error getting generated key or setting result to parameter object. Cause: java.lang.ClassCastException: oracle.sql.ROWID cannot be cast to java.lang.Comparable
   ### Reason analyze (If you can)
   getGeneratedKeys not support oracle.sql.ROWID
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   ![image](https://user-images.githubusercontent.com/40666803/234767227-4edfe93e-284e-48ff-9562-4d2a1d84306d.png)
   The data can be inserted successfully, but an exception will be thrown. Please tell me how to handle this exception thanks!
   ### 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] sandynz commented on issue #25347: getGeneratedKeys() Oracle ROWID not supported ->Comparable resultSet.getObject(1)

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

   @yuzx88 thanks for your feedback.
   
   @strongduanmu Could you help to verify whether it works or not


-- 
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] getGeneratedKeys() Oracle ROWID not supported ->Comparable resultSet.getObject(1) [shardingsphere]

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

   问题解决了吗


-- 
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] getGeneratedKeys() Oracle ROWID not supported ->Comparable resultSet.getObject(1) [shardingsphere]

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

   问题解决了,是因为Oracle使用了mybatis plus自动生成主键导致的,表里面也没有主键。加了主键,改成雪花算法生成id手动set后就正常了,
   ![image](https://github.com/apache/shardingsphere/assets/43299969/1d70b2f7-93bb-47be-9328-2cae3cd391a8)
   


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