jimmycheng888 opened a new issue #2302: ShardingPreparedStatement Class 
exception not caught
URL: https://github.com/apache/incubator-shardingsphere/issues/2302
 
 
   **Which version of ShardingSphere did you use?**
   3.1.0
   
   **Which project did you use? Sharding-JDBC or Sharding-Proxy?**
   Sharding-JDBC
   
   `Actual behavior`
   The code exception is not caught, causing a null pointer exception, and does 
not throw a true exception, making it impossible for the developer to 
accurately determine what went wrong.
   
   **Example codes for reproduce this issue (such as a github link).**
   The code  packge is : io.shardingsphere.shardingjdbc.jdbc.core.statement
   
   For example, the following code, the special symbol will be a direct null 
pointer, and the real reason is not exposed.
   
      ```
    @Override
       public boolean execute() throws SQLException {
           try {
               clearPrevious();
               sqlRoute();
               initPreparedStatementExecutor();
               return preparedStatementExecutor.execute();
           } finally {
               refreshTableMetaData(connection.getShardingContext(), 
routeResult.getSqlStatement());
               clearBatch();
           }
       }
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to