ERROR org.hibernate.transaction.JDBCTransaction - Could not toggle autocommit

异常信息:

2009-06-15 15:07:07,625 - org.hibernate.transaction.JDBCTransaction -21250 [http-8080-Processor22] ERROR org.hibernate.transaction.JDBCTransaction - Could not toggle autocommit
org.hibernate.SessionException: Session is closed
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:131)
at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransaction.java:174)
at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:122)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:95)
at com.gdms.dao.hibernate.HibernateUtil.commitTransaction(HibernateUtil.java:91)
at com.gdms.dao.imp.StudentDAOImp.getStudent(StudentDAOImp.java:23)
at com.gdms.service.ListStudent.listpage(ListStudent.java:39)
at com.gdms.service.ListStudent.list(ListStudent.java:30)

解决方法:

把hibernate.cfg.xml的connection.autocommit=true去掉....

你可能感兴趣的:(transaction)