解决Transaction is not active: + org.hibernate.exception.GenericJDBCException: Cannot open connection方法A

16:21:01,968 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id -3f57ff89:6ed:4ad2e511:55 invoked while multiple threads active within it.
16:21:01,968 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action -3f57ff89:6ed:4ad2e511:55 aborting with 1 threads active!
16:21:01,984 INFO [STDOUT] ====找不到 上日库存记录=====
16:21:02,015 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
16:21:02,015 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57ff89:6ed:4ad2e511:55 status: ActionStatus.ABORTING >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57ff89:6ed:4ad2e511:55 status: ActionStatus.ABORTING >)
16:21:02,015 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
16:21:02,015 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
16:21:02,015 ERROR [STDERR] at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:99)
16:21:02,015 ERROR [STDERR] at com.golden.info.dao.AnaCpbbDao.isHaveList(AnaCpbbDao.java:110)
16:21:02,015 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor757.invoke(Unknown Source)
16:21:02,015 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
16:21:02,015 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
16:21:02,015 ERROR [STDERR] at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
16:21:02,015 ERROR [STDERR] at com.golden.info.dao.AnaCpbbDao_$$_javassist_63.isHaveList(AnaCpbbDao_$$_javassist_63.java)
16:21:02,015 ERROR [STDERR] at com.golden.info.finance.session.AnaAction.addReports(AnaAction.java:113)

解决方法:

设置JBOSS服务器 jboss-service.xml配置文件 的事务超时时间

由默认的300秒 改多一点 如600秒

<!-- JBoss Transactions JTA -->
<mbean code="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
name="jboss:service=TransactionManager">
<attribute name="TransactionTimeout">600</attribute>
<attribute name="ObjectStoreDir">${jboss.server.data.dir}/tx-object-store</attribute>
</mbean>

你可能感兴趣的:(transaction)