title: GenericJDBCException: Could not open connection .. caused by javax.resource.ResourceException: IJ000459: Transaction is not active
body: <p>My Hibernate application starts running fine, but at some point something happens (I suspect some unexpected/unhandled constraint violation) that somehow breaks everything. From that point on I keep getting this huge stacktrace that I have trouble reading.... If I restart the app, or logout and login, the problem disappears for a while...</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/27775774/javax-resource-resourceexception-ij000460-error-checking-for-a-transaction">a related question</a>, but was asked in the comments to create a new one for my issue as the exception is a very generic one.</p>
  
  <p>Below a snipped version of the stacktrace. Full stacktrace on pastebin.</p>
  
  <pre><code>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 &lt; ac, BasicAction: 0:ffffac1001d4:-67c5b6ff:563b6a43:146d8 status: ActionStatus.ABORT_ONLY &gt;
          at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:399)
          ... 348 more
  </code></pre>
  
  <p><a href="http://pastebin.com/DV7zteED" rel="nofollow noreferrer">http://pastebin.com/DV7zteED</a></p>