0

每当我点击工作流选项卡时,安装在 My SQL 上的 Teamsite 都会在server.log中引发此错误。

我第一次遇到这样的错误。已经 4-5 个月了,teamsite 在我的虚拟机中运行完美。

这是堆栈跟踪。

ERROR LocalDataSourceJobStore,QuartzScheduler_JasperServerScheduler-NON_CLUSTERED_MisfireHandler:2414 - MisfireHandler: Error handling misfires: Couldn't rollback jdbc connection. No operations allowed after connection closed.
org.quartz.JobPersistenceException: Couldn't rollback jdbc connection. No operations allowed after connection closed. [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.]
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.rollbackConnection(JobStoreSupport.java:2279)
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.doRecoverMisfires(JobStoreCMT.java:1311)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2409)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2428)
* Nested Exception (Underlying Cause) ---------------
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
    at sun.reflect.GeneratedConstructorAccessor351.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.Util.getInstance(Util.java:386)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
    at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1290)
    at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1282)
    at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4975)
    at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:681)
    at org.jboss.resource.adapter.jdbc.WrappedConnection.rollback(WrappedConnection.java:500)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.rollbackConnection(JobStoreSupport.java:2277)
    at org.quartz.impl.jdbcjobstore.JobStoreCMT.doRecoverMisfires(JobStoreCMT.java:1311)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2409)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2428)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

有谁知道这种行为可能是什么原因?

4

1 回答 1

1

看来,您是在连接关闭时提交的。可能是您之前关闭它或它自动关闭。原因可能不同,但首先检查您的代码以确保在 finally 块中调用了 connection.closs() ,这将确保即使发生异常也会关闭。像这样的东西:

try {
   // Your code 
   conn.commit();
} catch (SQLException e) {
    conn.rollback()
} finally {
   conn.close();
}

另一项检查是将所有连接打开和关闭集中在一个地方,以免错过任何操作。

于 2014-01-28T14:16:34.967 回答