【发布时间】:2017-02-13 19:46:48
【问题描述】:
我使用 openjpa 并使用 store 和 commit。
Commit 有时会引发异常,但我无法获得更高的精度。
有时,我猜这是完整性问题(在同一日期存储两次)。
错误信息和堆栈是:
The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
<openjpa-2.4.1-r422266:1730418 fatal store error> org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.
...
但是在哪里可以找到更详细的原因,或者如何获得嵌套异常?
谢谢
【问题讨论】:
-
异常在哪里被捕获并发送到记录器?我想你可能只给了它消息,而不是异常本身,所以它没有显示堆栈和嵌套异常。
-
我同意前面的评论。异常堆栈应该有更多内容,并且应该有“由”信息引起的。查看系统输出或日志以获取更多详细信息,启用 OpenJPA 跟踪,或在捕获异常时执行“printStackTrace()”。
-
@coladict stacktrace is FailedObject: org.gramaco.Regle@1cb4f5f at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:595) 并调用:...不是更有用
标签: java sql jpa exception openjpa