Hide Forgot
Workaround: Workaround Exists Workaround Description: Changing the datasource type in gatein-ds.xml back to no-tx-datasource works for the purpose of Portal Booking Demo. project_key: JBEPP Portal Booking Demo is not usable with EPP in default configuration as it can't establish connection to the database. When you type a query in the demo, you get the following error (shortened): {code} 18:36:44,549 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@31fd8a 18:36:44,575 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null 18:36:44,575 ERROR [JDBCExceptionReporter] Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY >)) 18:36:44,748 ERROR [TxPolicy] javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection 18:36:44,765 SEVERE [event] Received 'javax.ejb.EJBTransactionRolledbackException' when invoking action listener '#{hotelSearch.find}' for component 'j_id16' 18:36:44,806 SEVERE [event] javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115) at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130) ... Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:103) at org.jboss.seam.example.booking.HotelSearchingAction.queryHotels(HotelSearchingAction.java:69) ... Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ... Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY >)) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95) at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY >) at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:475) at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625) ... Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY > at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:956) at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:752) ... 18:36:44,859 ERROR [AjaxViewRoot] Error processing faces event for the component pbG2d9d0ac9_2ded1c_2d4e24_2d80b4_2d0ecfbfd313e9:_viewRoot:searchCriteria:j_id16 javax.faces.event.AbortProcessingException: /main.xhtml @28,101 actionListener="#{hotelSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:118) at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) ... Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115) at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130) ... Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:103) at org.jboss.seam.example.booking.HotelSearchingAction.queryHotels(HotelSearchingAction.java:69) ... Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) ... Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY >)) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95) at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47) ... Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY >) at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:475) at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499) ... Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 7f000001:bb94:4e7c8ccc:6495 status: ActionStatus.ABORT_ONLY > at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:956) at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:752) ... 18:36:45,219 INFO [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed. sourceId=null[severity=(WARN 1), summary=(Transaction failed), detail=(Transaction failed)] {code} This is related to a change in EPP datasource configuration in _gatein-ds.xml_ (_local-tx-datasource_ in EPP 5.2.0.ER01 vs. _no-tx-datasource_ in EPP 5.1.1.GA). Changing the datasource type in _gatein-ds.xml_ back to _no-tx-datasource_ works as a workaround.
Full log attached.
Attachment: Added: datasource.log
Link: Added: This issue is related to JBQA-5399
This is probably because the local-tx-datasource does not support two phase commits, while the no-tx-datasource doesn't take part in the transactions. See http://community.jboss.org/wiki/ConfigDataSources and http://docs.jboss.org/jbossas/docs/Administration_And_Configuration_Guide/5/html/Configuring_JDBC_DataSources.html [there also might be an issue with local-tx-datasources and having multiple datasources specified] It looks like we need to have an xa-datasource instead I can't seem to find specific information in the documentation to really say what exactly is the reason we can't use the local-tx-datasource in our situation.
I changed gatein-idm back to no-tx-datasource, which fixes the problem as no-tx-datasource is isolated from JTA transaction management.
Release Notes Docs Status: Added: Needs More Info Release Notes Text: Added: CAUSE: CONSEQUENCE: FIX: RESULT: Primary SME: Added: theute NEEDINFO: Removed: Nobody Added: Subject Matter Expert
Release Notes Docs Status: Removed: Needs More Info Added: Not Required
Release Notes Text: Removed: CAUSE: CONSEQUENCE: FIX: RESULT: NEEDINFO: Removed: Subject Matter Expert