gpt4 book ai didi

java - GenericJDBCException : Could not open connection . 。由 javax.resource.ResourceException 引起:IJ000459:事务未激活

转载 作者:太空宇宙 更新时间:2023-11-04 13:15:40 27 4
gpt4 key购买 nike

我的 Hibernate 应用程序开始运行良好,但在某些时候发生了一些事情(我怀疑某些意外/未处理的约束违规),以某种方式破坏了一切。从那时起,我不断收到这个巨大的堆栈跟踪,我很难阅读......如果我重新启动应用程序,或注销并登录,问题就会消失一段时间......

我找到了a related question ,但在评论中被要求为我的问题创建一个新的,因为异常(exception)是一个非常通用的异常(exception)。

下面是堆栈跟踪的截图版本。 Pastebin 上的完整堆栈跟踪。

2015-11-05 17:27:39,349 ERROR [io.undertow.request] (default task-11) UT005023: Exception handling request to /api/ratings/synch: org.jboss.resteasy.spi.UnhandledException: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Could not open connection
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76) [resteasy-jaxrs-3.0.10.Final.jar:]
...
Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Could not open connection
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:163) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
...
at net.bridalapp.db.CrudService$$$view1.find(Unknown Source) [classes:]
...
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763) [hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]
...
at net.bridalapp.db.CrudServiceBean.find(CrudServiceBean.java:213) [classes:]
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) [:1.8.0_65]
...
Caused by: org.hibernate.exception.GenericJDBCException: Could not open connection
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54) [hibernate-core-4.3.7.Final.jar:4.3.7.Final]
...
Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:154)
...
Caused by: javax.resource.ResourceException: IJ000460: Error checking for a transaction
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:415)
...
Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffffac1001d4:-67c5b6ff:563b6a43:146d8 status: ActionStatus.ABORT_ONLY >
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:399)
... 348 more

http://pastebin.com/DV7zteED

最佳答案

我在 Wildfly/hibernate 中遇到了同样的错误。对我来说,问题是我正在运行一个很长的事务,并且有大量的 hibernate 事务,这填满了我的内存。就我而言,答案是,在指定数量的交易之后,我执行了以下操作:em.flush();em.clear();HTH

关于java - GenericJDBCException : Could not open connection . 。由 javax.resource.ResourceException 引起:IJ000459:事务未激活,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33556244/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com