日期:2014-05-17  浏览次数:20736 次

如何把控制台输出的完整错误信息保存到文本?
本帖最后由 u013558606 于 2014-04-01 09:26:20 编辑
控制台输出的错误信息

[INFO ] [09:10:08] org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl - HHH000010: On release of batch it still contained JDBC statements
[WARN ] [09:10:08] org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 23505
[ERROR] [09:10:08] org.hibernate.engine.jdbc.spi.SqlExceptionHelper - 批次处理 0 insert into cattagb_page (btname, burl, bvid, commentnums, curl, imgpath, jianjie, paiming, popularity, productnums, supercurlkey, turl, userdislike, usergrade, userlike, tburl) values ('....') 被中止,呼叫 getNextException 以取得原因。
[WARN ] [09:10:08] org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 0, SQLState: 23505
[ERROR] [09:10:08] org.hibernate.engine.jdbc.spi.SqlExceptionHelper - 错误: 重复键违反唯一约束"uk_ex9kef7svstkgntmfy2vh5emn"
  详细:键值"(turl, burl)=(laVjN, ChsfT)" 已经存在
[ERROR] [09:10:08] org.hibernate.engine.jdbc.batch.internal.BatchingBatch - HHH000315: Exception executing batch [could not execute batch]
org.hibernate.exception.ConstraintViolationException: could not execute batch
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:132)
at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:111)
at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:163)
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.getBatch(JdbcCoordinatorImpl.java:206)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3102)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3587)
at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:103)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:453)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:345)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1218)
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:421)
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:177)
at zyme.tools.hibernate.MyHibernateUtil.oneThreadCheckThanSaveAllUpgraded(MyHibernateUtil.java:244)
at threads.save.SaveThread.savebegin(SaveThread.jav