很多时候,我会在 Java 日志中得到类似以下内容:
Caused by: java.sql.BatchUpdateException: failed batch
at org.hsqldb.jdbc.jdbcStatement.executeBatch(jdbcStatement.java:1102)
at org.hsqldb.jdbc.jdbcPreparedStatement.executeBatch(jdbcPreparedStatement.java:514)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
... 113 more
有谁知道如何显示完整的堆栈跟踪(即显示其他 113 行)?
The JavaDocs(适用于 Java 7)对于 Throwable 对发生的事情有非常详细的解释。
当您看到“...113 more”时,这意味着“由”异常的其余行与父异常的该点上的其余行相同。
例如,您将拥有
com.something.XyzException
at ...
at ...
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
at ... <the other 113 lines are here>...
Caused by: <the above>.
两个堆栈跟踪在 AbstractBatcher.executeBatch 第 242 行“相遇”,然后从那时起向上的调用跟踪与包装异常相同。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)