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 2020/01/17 07:22:20 UTC
[GitHub] [incubator-shardingsphere] yexufeijun opened a new issue #4006: Execute insert SQL error,columnNames size is 0,java.util.NoSuchElementException
yexufeijun opened a new issue #4006: Execute insert SQL error,columnNames size is 0,java.util.NoSuchElementException
URL: https://github.com/apache/incubator-shardingsphere/issues/4006
demo: https://github.com/yexufeijun/sharding-jdbc-test-demo.git
error msg:
### Error updating database. Cause: java.util.NoSuchElementException
### The error may exist in com/example/sharding/mapper/TestShardingAMapper.java (best guess)
### The error may involve com.example.sharding.mapper.TestShardingAMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO TEST_SHARDING_A ( id, sd_name ) VALUES ( ?, ? )
### Cause: java.util.NoSuchElementException
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
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:426)
... 69 more
Caused by: java.util.NoSuchElementException
at java.util.Collections$EmptyIterator.next(Collections.java:4189)
at org.apache.shardingsphere.core.route.router.sharding.condition.engine.InsertClauseShardingConditionEngine.createShardingCondition(InsertClauseShardingConditionEngine.java:85)
at org.apache.shardingsphere.core.route.router.sharding.condition.engine.InsertClauseShardingConditionEngine.createShardingConditions(InsertClauseShardingConditionEngine.java:64)
at org.apache.shardingsphere.core.route.router.sharding.ShardingRouter.getShardingConditions(ShardingRouter.java:129)
at org.apache.shardingsphere.core.route.router.sharding.ShardingRouter.route(ShardingRouter.java:106)
at org.apache.shardingsphere.core.route.PreparedStatementRoutingEngine.route(PreparedStatementRoutingEngine.java:63)
at org.apache.shardingsphere.core.PreparedQueryShardingEngine.route(PreparedQueryShardingEngine.java:59)
at org.apache.shardingsphere.core.BaseShardingEngine.executeRoute(BaseShardingEngine.java:85)
at org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:68)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.shard(ShardingPreparedStatement.java:249)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:190)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
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.$Proxy90.update(Unknown Source)
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.update(MybatisCachingExecutor.java:83)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu closed issue #4006: Execute insert SQL error,columnNames size is 0,java.util.NoSuchElementException
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4006: Execute insert SQL error,columnNames size is 0,java.util.NoSuchElementException
URL: https://github.com/apache/incubator-shardingsphere/issues/4006
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4006: Execute insert SQL error,columnNames size is 0,java.util.NoSuchElementException
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #4006: Execute insert SQL error,columnNames size is 0,java.util.NoSuchElementException
URL: https://github.com/apache/incubator-shardingsphere/issues/4006#issuecomment-575965533
Duplicate with #3962
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] SteNicholas commented on issue #4006: Execute insert SQL error,columnNames size is 0,java.util.NoSuchElementException
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on issue #4006: Execute insert SQL error,columnNames size is 0,java.util.NoSuchElementException
URL: https://github.com/apache/incubator-shardingsphere/issues/4006#issuecomment-575605498
@yexufeijun You could refer to [Oracle insert statement encrypt bug of version 4.0.0](https://github.com/apache/incubator-shardingsphere/issues/3962) and modify local code accoridng to the pr. Lastly compile a version to use.
----------------------------------------------------------------
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
With regards,
Apache Git Services