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 2021/05/31 07:52:18 UTC

[GitHub] [shardingsphere] totalo opened a new issue #10583: npe occurs when sharding-raw-jdbc-example is in SHARDING_READWRITE_SPLITTING type

totalo opened a new issue #10583:
URL: https://github.com/apache/shardingsphere/issues/10583


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   5.0.0-RC1-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
   
   Complete the example as normal
   
   ### Actual behavior
   
   npe
   ```
   Exception in thread "main" java.lang.NullPointerException
   	at org.apache.shardingsphere.driver.jdbc.adapter.executor.ForceExecuteTemplate.execute(ForceExecuteTemplate.java:42)
   	at org.apache.shardingsphere.driver.jdbc.adapter.AbstractResultSetAdapter.close(AbstractResultSetAdapter.java:82)
   	at org.apache.shardingsphere.example.core.jdbc.repository.OrderRepositoryImpl.getOrders(OrderRepositoryImpl.java:114)
   	at org.apache.shardingsphere.example.core.jdbc.repository.OrderRepositoryImpl.selectAll(OrderRepositoryImpl.java:98)
   	at org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl.printData(OrderServiceImpl.java:148)
   	at org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl.processSuccess(OrderServiceImpl.java:95)
   	at org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate.run(ExampleExecuteTemplate.java:29)
   	at org.apache.shardingsphere.example.sharding.raw.jdbc.JavaConfigurationExampleMain.main(JavaConfigurationExampleMain.java:42)
   ```
   
   ### Reason analyze (If you can)
   resultSet is null , When he shuts down, an exception occurs
   
   
   ### 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



[GitHub] [shardingsphere] RaigorJiang commented on issue #10583: npe occurs when sharding-raw-jdbc-example is in SHARDING_READWRITE_SPLITTING type

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #10583:
URL: https://github.com/apache/shardingsphere/issues/10583#issuecomment-855397298


   ![image](https://user-images.githubusercontent.com/5668787/120925501-80899500-c70b-11eb-8fdd-c778e3e5d07e.png)
   
   I tested this scenario and there was no exception. 
   If any table does not exist in databases, it may cause the problem described by @totalo 


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



[GitHub] [shardingsphere] totalo commented on issue #10583: npe occurs when sharding-raw-jdbc-example is in SHARDING_READWRITE_SPLITTING type

Posted by GitBox <gi...@apache.org>.
totalo commented on issue #10583:
URL: https://github.com/apache/shardingsphere/issues/10583#issuecomment-855741193


   Sorry, this is my configuration problem


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



[GitHub] [shardingsphere] totalo closed issue #10583: npe occurs when sharding-raw-jdbc-example is in SHARDING_READWRITE_SPLITTING type

Posted by GitBox <gi...@apache.org>.
totalo closed issue #10583:
URL: https://github.com/apache/shardingsphere/issues/10583


   


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