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 2022/10/10 06:42:06 UTC
[GitHub] [shardingsphere] onevroad opened a new issue, #15689: Cannot batch insert in Oracle
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] RaigorJiang commented on issue #15689: Cannot batch insert in Oracle
Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #15689:
URL: https://github.com/apache/shardingsphere/issues/15689#issuecomment-1407581398
Hi @cheese8 ,
Is there an update?
--
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
[GitHub] [shardingsphere] github-actions[bot] commented on issue #15689: Cannot batch insert in Oracle
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #15689:
URL: https://github.com/apache/shardingsphere/issues/15689#issuecomment-1272350291
Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.
--
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
[GitHub] [shardingsphere] cheese8 commented on issue #15689: Cannot batch insert in Oracle
Posted by GitBox <gi...@apache.org>.
cheese8 commented on issue #15689:
URL: https://github.com/apache/shardingsphere/issues/15689#issuecomment-1223601461
> Hi @cheese8 Can this issue be done in 5.1.3?
Sorry, quite busy recently, maybe 5.1.4
--
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] Cannot batch insert in Oracle [shardingsphere]
Posted by "amorxxf (via GitHub)" <gi...@apache.org>.
amorxxf commented on issue #15689:
URL: https://github.com/apache/shardingsphere/issues/15689#issuecomment-1996316113
Hi @cheese8 , 5.4.1 has same problem, has this issue been done?
--
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
[GitHub] [shardingsphere] strongduanmu commented on issue #15689: Cannot batch insert in Oracle
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #15689:
URL: https://github.com/apache/shardingsphere/issues/15689#issuecomment-1223581409
Hi @cheese8 Can this issue be done in 5.1.3?
--
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
[GitHub] [shardingsphere] github-actions[bot] closed issue #15689: Cannot batch insert in Oracle
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #15689: Cannot batch insert in Oracle
URL: https://github.com/apache/shardingsphere/issues/15689
--
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