The issue occurs not only during updates but also intermittently during inserts.

The exception message is as follows:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: java.lang.NullPointerException
### The error may exist in class path resource [mapper/UserDigestPartitionMapper.xml]
### The error may involve com.a.dao.mapper.AMapper.batchDelete-Inline
### The error occurred while setting parameters
### SQL: update table_name set *****(It’s inconvenient to show, but there’s no problem)
### Cause: java.lang.NullPointerException
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
    at com.sun.proxy.$Proxy241.update$original$oSjoG3kH(Unknown Source) ~[?:?]
    at com.sun.proxy.$Proxy241.update$original$oSjoG3kH$accessor$uvnCqopq(Unknown Source) ~[?:?]
    at com.sun.proxy.$Proxy241$auxiliary$gLlaRWG8.call(Unknown Source) ~[?:?]
    at com.sun.proxy.$Proxy241.update(Unknown Source) ~[?:?]
    at org.mybatis.spring.SqlSessionTemplate.update$original$n6HhRjh8(SqlSessionTemplate.java:288) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
    at org.mybatis.spring.SqlSessionTemplate.update$original$n6HhRjh8$accessor$iwhwph8a(SqlSessionTemplate.java) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
    at org.mybatis.spring.SqlSessionTemplate$auxiliary$oRHA7ZgN.call(Unknown Source) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
    at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
    at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:64) ~[mybatis-plus-core-3.4.3.1.jar!/:3.4.3.1]
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148) ~[mybatis-plus-core-3.4.3.1.jar!/:3.4.3.1]
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) ~[mybatis-plus-core-3.4.3.1.jar!/:3.4.3.1]
    at com.sun.proxy.$Proxy244.batchDelete(Unknown Source) ~[?:?]

Comment From: harawata

Hello @sangewuxie ,

The stack trace looks incomplete (which is not helpful), but I can see mybatis-plus is used. As mybatis-plus is not our product, you need to isolate the issue from mybatis-plus first. Once the issue is reproduced without mybatis-plus, please post the full stack trace.

Comment From: sangewuxie

oh ,no.The stack trace I provided is quite complete; any further information would be irrelevant. If there is a suspicion that using MyBatis-Plus might be causing this issue, I believe it indicates an imperfection in the underlying framework.

Comment From: harawata

I'm not exactly sure what you mean, but you are not going to follow my instruction about isolating the issue from mybatis-plus, I guess? If that is the case, there is nothing we can do here, I am afraid.

You can try reporting the issue to the mybatis-plus' tracker. They might be able to help you narrow down the problem if you provide enough information. https://github.com/baomidou/mybatis-plus/issues

By the way, if the stack trace you posted is the only output in the log, the important part may be lost somewhere in your application stack.

[EDIT] You already submitted the same issue on mybatis-plus tracker, it seems. https://github.com/baomidou/mybatis-plus/issues/6313