Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasionally occurs java.lang.NullPointerException,but retrying fixes it #3196

Closed
sangewuxie opened this issue Jul 6, 2024 · 3 comments
Closed

Comments

@sangewuxie
Copy link

sangewuxie commented Jul 6, 2024

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) ~[?:?]
@harawata
Copy link
Member

harawata commented Jul 6, 2024

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.

@sangewuxie
Copy link
Author

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.

@harawata
Copy link
Member

harawata commented Jul 7, 2024

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.
baomidou/mybatis-plus#6313

@harawata harawata closed this as completed Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants