We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AREX Java Agent (arextest/arex-agent-java)
现象描述: 使用arex对以下hibernate代码进行录制: MarkLogDO markLogDO = markLogRepo.findByRemark(remark); markLogDO.setLogFilePath(filePath); return markLogRepo.save(markLogDO);
录制结果正常(一条query、一条update),当对该条数据进行回放时出现空指针异常 java. lang. NullPointerException: null at org.hibernate. loader.entity.AbstractEntityLoader. load(AbstractEntityLoader. java: 86) at org.hibernate. loader.entity.AbstractEntityLoader. load(AbstractEntityLoader. java:63) at org.hibernate.persister.entity.AbstractEntityPersister.doLoad(AbstractEntityPersister.java:4415) at org.hibernate.persister.entity.AbstractEntityPersister. load(AbstractEntityPersister. java:4405)
排查过程: 根据hibernate源码显示,在执行save操作时,org.hibernate.event.internal.DefaultMergeEventListener.onMerge()方法会对游离态实体执行select xxx by id做一次状态合并,而录制时实体的状态是持久态,不需要查一次id就没录,因为没有录制 所以回放失败 但是select xxx by id的行为并不是我们自己执行的 而是hibernate内部行为
期望hibernate使用方可以不关心接口内部实现做到回放正常
1
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Search before asking
AREX Test Service
AREX Java Agent (arextest/arex-agent-java)
Current Behavior
现象描述:
使用arex对以下hibernate代码进行录制:
MarkLogDO markLogDO = markLogRepo.findByRemark(remark);
markLogDO.setLogFilePath(filePath);
return markLogRepo.save(markLogDO);
录制结果正常(一条query、一条update),当对该条数据进行回放时出现空指针异常
java. lang. NullPointerException: null
at org.hibernate. loader.entity.AbstractEntityLoader. load(AbstractEntityLoader. java: 86)
at org.hibernate. loader.entity.AbstractEntityLoader. load(AbstractEntityLoader. java:63)
at org.hibernate.persister.entity.AbstractEntityPersister.doLoad(AbstractEntityPersister.java:4415)
at org.hibernate.persister.entity.AbstractEntityPersister. load(AbstractEntityPersister. java:4405)
排查过程:
根据hibernate源码显示,在执行save操作时,org.hibernate.event.internal.DefaultMergeEventListener.onMerge()方法会对游离态实体执行select xxx by id做一次状态合并,而录制时实体的状态是持久态,不需要查一次id就没录,因为没有录制 所以回放失败 但是select xxx by id的行为并不是我们自己执行的 而是hibernate内部行为
Expected Behavior
期望hibernate使用方可以不关心接口内部实现做到回放正常
Steps To Reproduce
1
Anything else
No response
Are you willing to submit a pull request to fix on your own?
The text was updated successfully, but these errors were encountered: