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/12/11 01:22:16 UTC

[GitHub] [shardingsphere] 50133142 opened a new issue #8571: Cannot invoke method mod() on null object] with root cause

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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-742955613


   Hi @50133142 
   Thanks for your detailed issue. Do you have any thought to solve this issue as you have gotten its cause?


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



[GitHub] [shardingsphere] 50133142 commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
50133142 commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-743201837


   ![image](https://user-images.githubusercontent.com/42038247/101862506-78fa9080-3bad-11eb-9716-ba7166c75d33.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:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-932690295


   Please notice that for English only


-- 
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] ajdfajdfl2003 commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
ajdfajdfl2003 commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-869132504


   @Jearys 原先創建表欄位名是使用大寫
   後來改小寫即可


-- 
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] tristaZero commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-822893185


   Hi the log showed us the potential reason that there are some null or unqualified values for the sharding column.


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



[GitHub] [shardingsphere] 50133142 closed issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
50133142 closed issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571


   


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



[GitHub] [shardingsphere] xuup commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
xuup commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-807898502


   > 问题怎么解决的
   检查下sharding-column 与 算法表达式中的分片键是否一致,亲测有效~
   


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



[GitHub] [shardingsphere] daiyunqing commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
daiyunqing commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-768007120


   检查下配置 algorithm-expression: 中的算法列 与sharding-column: 列一致不


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



[GitHub] [shardingsphere] Jearys commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
Jearys commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-822013291


   sharding-column 与 算法表达式中的分片键完全一致,出现了相同问题,请问要怎么解决呢


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



[GitHub] [shardingsphere] daocaorenbao commented on issue #8571: Cannot invoke method mod() on null object] with root cause

Posted by GitBox <gi...@apache.org>.
daocaorenbao commented on issue #8571:
URL: https://github.com/apache/shardingsphere/issues/8571#issuecomment-797359910


   问题怎么解决的


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