lthaoshao opened a new issue #136: An exception occurred during the database 
test using Oracle
URL: https://github.com/apache/incubator-shardingsphere-example/issues/136
 
 
   Version: Sharding-jdbc 4.0.0-RC1 release
   Test: sharding-jdbc-spring-namespace    
   Database: Oracle 11g
   Description:
     I wanted to test sharding database. I referenced the demo , and used 
oracle . I created test_0 and test_1,  and tables in advance; An exception 
occurred during I was testing. I tried to track it, but some groovy code could 
not be entered. 
     Is this version of Oracle support yet verified? 
     Is Oracle able to provide the same demo as Mysql?
   
     The exception information is as follows:
   `Exception in thread "main" org.mybatis.spring.MyBatisSystemException: 
nested exception is org.apache.ibatis.exceptions.PersistenceException: 
   ### Error updating database.  Cause: java.lang.NullPointerException: Cannot 
invoke method mod() on null object
   ### The error may involve 
com.example.common.dal.mapper.OrderMapper.insert-Inline
   ### The error occurred while setting parameters
   ### SQL: insert into TEST_0.T_ORDER (ORDER_ID, USER_ID, STATUS       )     
values (?, ?, ?       )
   ### Cause: java.lang.NullPointerException: Cannot invoke method mod() on 
null object
        at 
org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:79)
        at 
org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
        at com.sun.proxy.$Proxy17.insert(Unknown Source)
        at 
org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:279)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:57)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
        at com.sun.proxy.$Proxy18.insert(Unknown Source)
        at 
com.example.service.impl.SpringPojoServiceImpl.insertOrder(SpringPojoServiceImpl.java:36)
        at 
com.example.service.impl.SpringPojoServiceImpl.process(SpringPojoServiceImpl.java:25)
        at 
com.example.SpringNamespaceExample.main(SpringNamespaceExample.java:36)
   Caused by: org.apache.ibatis.exceptions.PersistenceException: 
   ### Error updating database.  Cause: java.lang.NullPointerException: Cannot 
invoke method mod() on null object
   ### The error may involve 
com.example.common.dal.mapper.OrderMapper.insert-Inline
   ### The error occurred while setting parameters
   ### SQL: insert into TEST_0.T_ORDER (ORDER_ID, USER_ID, STATUS       )     
values (?, ?, ?       )
   ### Cause: java.lang.NullPointerException: Cannot invoke method mod() on 
null object
        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:434)
        ... 8 more
   Caused by: java.lang.NullPointerException: Cannot invoke method mod() on 
null object
        at 
org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
        at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at 
org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
        at Script1$_run_closure1.doCall(Script1.groovy:1)
        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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at 
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)
        at groovy.lang.Closure.call(Closure.java:426)
        at groovy.lang.Closure.call(Closure.java:420)
        at 
org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.execute(InlineShardingStrategy.java:86)
        at 
org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.doSharding(InlineShardingStrategy.java:68)
        at 
org.apache.shardingsphere.core.strategy.route.inline.InlineShardingStrategy.doSharding(InlineShardingStrategy.java:59)
        at 
org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.routeDataSources(StandardRoutingEngine.java:191)
        at 
org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.route(StandardRoutingEngine.java:178)
        at 
org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.routeByShardingConditionsWithCondition(StandardRoutingEngine.java:108)
        at 
org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.routeByShardingConditions(StandardRoutingEngine.java:102)
        at 
org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.getDataNodes(StandardRoutingEngine.java:87)
        at 
org.apache.shardingsphere.core.route.type.standard.StandardRoutingEngine.route(StandardRoutingEngine.java:69)
        at 
org.apache.shardingsphere.core.route.router.sharding.ParsingSQLRouter.route(ParsingSQLRouter.java:106)
        at 
org.apache.shardingsphere.core.route.PreparedStatementRoutingEngine.route(PreparedStatementRoutingEngine.java:66)
        at 
org.apache.shardingsphere.core.PreparedQueryShardingEngine.route(PreparedQueryShardingEngine.java:60)
        at 
org.apache.shardingsphere.core.BaseShardingEngine.shard(BaseShardingEngine.java:64)
        at 
org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.shard(ShardingPreparedStatement.java:224)
        at 
org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:170)
        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 
org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:198)
        ... 14 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to