How do I stop stacktraces truncating in logs

后端 未结 6 1325
逝去的感伤
逝去的感伤 2020-11-27 17:39

Lots of times in Java logs I\'ll get something like:

Caused by: java.sql.BatchUpdateException: failed batch
    at org.hsqldb.jdbc.jdbcStatement.executeBatch         


        
6条回答
  •  一整个雨季
    2020-11-27 17:48

    In a blog post I just described how to get more than just "BatchUpdateException: failed batch": set hibernate.jdbc.factory_class=org.hibernate.jdbc.NonBatchingBatcherFactory to disable batching in hibernate. Normally one can use BatchUpdateException.getNextException to get the reason of the failure, but in some cases this may return null. Then it's useful to disable batching completely.

提交回复
热议问题