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

   ## Bug Report
   
   When i use the sharding-jdbc to batch insert sql in Oracle ,it gives me a 
exception.
   But MySQL is OK.
   
   ### Which version of ShardingSphere did you use?
   
   sharding 5.1.0
   java 1.8
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-JDBC
   
   ### Expected behavior
   
   ### Actual behavior
   
   My sql is:
   ` INSERT ALL     INTO  demo_sharding   ( 
id,name,content,remark,creator_id,create_time,updator_id,update_time,flag )   
VALUES  ( ?,?,?,?,?,?,?,?,? )    SELECT 1 FROM DUAL`
   
   the Exception is :
   
   ```
   ### Error updating database.  Cause: java.lang.NullPointerException
   ### The error may involve 
demo.data.mapper.DemoShardingMapper.insertBatch-Inline
   ### The error occurred while setting parameters
   ### SQL: INSERT ALL     INTO  demo_sharding   ( 
id,name,content,remark,creator_id,create_time,updator_id,update_time,flag )   
VALUES  ( ?,?,?,?,?,?,?,?,? )    SELECT 1 FROM DUAL
   ### Cause: java.lang.NullPointerException
        at 
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
        at 
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:200)
        at 
org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:185)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
        ... 7 more
   Caused by: java.lang.NullPointerException
        at 
org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext.<init>(InsertStatementContext.java:82)
        at 
org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.getDMLStatementContext(SQLStatementContextFactory.java:142)
        at 
org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:116)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createLogicSQL(ShardingSpherePreparedStatement.java:438)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:331)
        at 
org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:46)
        at 
org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
        at 
org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
        at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
        at 
org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
        at com.sun.proxy.$Proxy257.update(Unknown Source)
        at 
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
        ... 13 more
   ```
   


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to