50133142 opened a new issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571


   **Use version :5.0.0-RC1-SNAPSHOT
   Two DB, Each DB  16 tables**
   
![image](https://user-images.githubusercontent.com/42038247/101849143-09c37300-3b92-11eb-8cf2-ffd6f48d70f2.png)
   **error info:**
   2020-12-10 23:28:34.250 DEBUG 19460 --- [0.0-8090-exec-1] 
o.d.h.d.c.order.mapper.OrderMapper.save  : ==>  Preparing: insert into 
`t_order` (create_time,number,status,product_id,total_amount,count,user_id) 
values ( ?,?,?,?,?,?,?) 
   2020-12-10 23:28:37.056 DEBUG 19460 --- [0.0-8090-exec-1] 
o.d.h.d.c.order.mapper.OrderMapper.save  : ==> Parameters: 2020-12-10 
23:28:25.488(Timestamp), 5892322526713430016(String), 1(Integer), 1(String), 
1(BigDecimal), 1(Integer), 451581(Integer)
   2020-12-10 23:28:37.576 ERROR 19460 --- [0.0-8090-exec-1] 
o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet 
[dispatcherServlet] in context with path [] threw exception [Request processing 
failed; nested exception is 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 
org.dromara.hmily.demo.common.order.mapper.OrderMapper.save-Inline
   ### The error occurred while setting parameters
   ### SQL: insert into `t_order` 
(create_time,number,status,product_id,total_amount,count,user_id)  values ( 
?,?,?,?,?,?,?)
   ### Cause: java.lang.NullPointerException: Cannot invoke method mod() on 
null object] with root cause
   
   java.lang.NullPointerException: Cannot invoke method mod() on null object
        at 
org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91) 
~[groovy-2.4.19-indy.jar:2.4.19]
        at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:47)
 ~[groovy-2.4.19-indy.jar:2.4.19]
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
 ~[groovy-2.4.19-indy.jar:2.4.19]
        at 
org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:34) 
~[groovy-2.4.19-indy.jar:2.4.19]
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
 ~[groovy-2.4.19-indy.jar:2.4.19]
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
 ~[groovy-2.4.19-indy.jar:2.4.19]
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
 ~[groovy-2.4.19-indy.jar:2.4.19]
        at Script6$_run_closure1.doCall(Script6.groovy:1) ~[na:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[na:1.8.0_201]
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[na:1.8.0_201]
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[na:1.8.0_201]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
        at 
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) 
~[groovy-2.4.19-indy.jar:2.4.19]
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) 
~[groovy-2.4.19-indy.jar:2.4.19]
        at 
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
 ~[groovy-2.4.19-indy.jar:2.4.19]
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034) 
~[groovy-2.4.19-indy.jar:2.4.19]
        at groovy.lang.Closure.call(Closure.java:420) 
~[groovy-2.4.19-indy.jar:2.4.19]
        at groovy.lang.Closure.call(Closure.java:414) 
~[groovy-2.4.19-indy.jar:2.4.19]
        at 
org.apache.shardingsphere.sharding.algorithm.sharding.inline.InlineShardingAlgorithm.doSharding(InlineShardingAlgorithm.java:69)
 
   
   **分片建传了一个null,但是如下图有数据呀**
   
![image](https://user-images.githubusercontent.com/42038247/101849129-029c6500-3b92-11eb-9a83-93dcb3c41aab.png)
   


----------------------------------------------------------------
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]


Reply via email to