HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception javax.servlet.ServletException: Could not commit Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC commit failed
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)root cause org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC commit failed
org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:582)root cause org.hibernate.TransactionException: JDBC commit failed
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:130)
org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit.aop.interceptor..chainroot cause com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
--------------------------------------------------------------------------------Apache Tomcat/5.5.25
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)root cause org.springframework.transaction.TransactionSystemException: Could not commit Hibernate transaction; nested exception is org.hibernate.TransactionException: JDBC commit failed
org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:582)root cause org.hibernate.TransactionException: JDBC commit failed
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:130)
org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit.aop.interceptor..chainroot cause com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.
--------------------------------------------------------------------------------Apache Tomcat/5.5.25
在transaction commit以前 connection 已经关闭了
建议你在每一次操作完以后把数据连接对象关闭并且设为null
mysql默认8小时关闭空闲连接,而应用程序正好在连接池中获取到该连接导致错误建议:更换连接池
或者修改mysql默认关闭连接时间
连接已经关闭,在操作该连接打开的事务时抛出错误