[EJB 3.0] - JBoss 5 Tx Enlist Problem
by apill
I have an issue with my EJB3 application since migrating to JBoss 5 Beta 1.
The initial error I receive is..
| 10:19:53,324 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
| 10:19:53,324 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: -53efc9f2:c46d:45b48f67:6f status: 3 >); - 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: -53efc9f2:c46d:45b48f67:6f status: 3 >))
|
My setup is..
EAR file contains
i. Domain model jar for the main database access
ii. Domain model for an external contact address database
iii. EJB jar for accessing the main database
iv. EJB jar for accessing the external address system
The scenario is..
1. Client application calls a SLSB (Stateless Session Bean) that accesses the main application database (item iii. in the EAR file content list above)
2. This EJB then calls a SLSB for the external address system to get some address details from the external address system (item iv. in the EAR file content list above)
3. This should return to the calling SLSB and then that call should return to the client application.
The exception is thrown when the first SLSB calls the second SLSB.
More complete logs including the server log with TRACE logging switched on for org.jboss.resource.connectionmanager.TxConnectionManager are available at:
http://devissues.googlepages.com/jboss5txenlistproblem
The jboss console output at the time of the error is:
| 10:19:53,324 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
| 10:19:53,324 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: -53efc9f2:c46d:45b48f67:6f status: 3 >); - 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: -53efc9f2:c46d:45b48f67:6f status: 3 >))
| 10:19:53,450 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_PROTO for < 131075, 28, 26, 1--53efc9f2:c46d:45b48f67:7f-53efc9f2:c46d:45b48f67:8b >
| 10:19:53,450 ERROR [STDERR] org.jboss.resource.connectionmanager.JBossLocalXAException: Trying to start a new tx when old is not complete! old: < 131075, 28, 26, 1--53efc9f2:c46d:45b48f67:6f-53efc9f2:c46d:45b48f67:7e >, new < 131075, 28, 26, 1--53efc9f2:c46d:45b48f67:7f-53efc9f2:c46d:45b48f67:8b >, flags 0
| 10:19:53,451 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.start(TxConnectionManager.java:938)
| 10:19:53,451 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:667)
| 10:19:53,451 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:415)
| 10:19:53,451 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:825)10:19:53,451 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:616)
| 10:19:53,451 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:373)
| 10:19:53,451 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:516)
| 10:19:53,451 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:397)
| 10:19:53,451 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
| 10:19:53,451 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1538)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.loader.Loader.doQuery(Loader.java:661)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.loader.Loader.doList(Loader.java:2211)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.loader.Loader.list(Loader.java:2090)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388)
| 10:19:53,451 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
| 10:19:53,452 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
| 10:19:53,452 ERROR [STDERR] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
| 10:19:53,452 ERROR [STDERR] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
| 10:19:53,452 ERROR [STDERR] at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:804)
| 10:19:53,452 ERROR [STDERR] at com.dolby.maximizer.dao.hibernate.MaximizerDAOHibernate.findByRecordId(MaximizerDAOHibernate.java:111)
| 10:19:53,563 ERROR [STDERR] at com.dolby.maximizer.dao.hibernate.MaximizerDAOHibernate.getAddressInfo(MaximizerDAOHibernate.java:130)
| 10:19:53,563 ERROR [STDERR] at com.dolby.maximizer.ejb.bean.impl.MaximizerAddressProviderBean.getAddressInfo(MaximizerAddressProviderBean.java:48)
| 10:19:53,563 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 10:19:53,563 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 10:19:53,563 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 10:19:53,563 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:589)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:121)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:110)
| 10:19:53,563 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| 10:19:53,563 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,563 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,563 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,563 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| 10:19:53,563 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,564 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| 10:19:53,564 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| 10:19:53,564 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,564 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| 10:19:53,564 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,564 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| 10:19:53,564 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,564 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:214)
| 10:19:53,564 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| 10:19:53,564 ERROR [STDERR] at $Proxy84.getAddressInfo(Unknown Source)
| 10:19:53,564 ERROR [STDERR] at com.dolby.pics.core.ejb.bean.impl.ExternalAddressBean.getAddressInfo(ExternalAddressBean.java:75)
| 10:19:53,564 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 10:19:53,564 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 10:19:53,564 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 10:19:53,564 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:589)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:121)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:110)
| 10:19:53,566 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| 10:19:53,566 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,566 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,566 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:193)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,566 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| 10:19:53,566 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,566 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| 10:19:53,566 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,566 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| 10:19:53,567 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| 10:19:53,567 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:279)
| 10:19:53,567 ERROR [STDERR] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
| 10:19:53,567 ERROR [STDERR] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| 10:19:53,567 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:1008)
| 10:19:53,567 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:857)
| 10:19:53,567 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:454)
| 10:19:53,567 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:527)
| 10:19:53,567 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:261)
| 10:19:53,569 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
| 10:19:53,569 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: -53efc9f2:c46d:45b48f67:7f status: 3 >); - 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: -53efc9f2:c46d:45b48f67:7f status: 3 >))
|
I've seen people with a similar error but no answer to my problem. It is most likely something I've done, but I am completely stuped as to a solution. BTW this all worked in JBoss 4.0.4 - though that used older versions of EJB3 and hibernate.
Any help would be very much appreciated as I have spent 2 full days trying to debug the issue to no avail.
Thanks for your help.
Adrian
[/url]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004781#4004781
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004781
19 years, 3 months
[Remoting] - Re: Error connecting to ejb3 cluster
by ash42
"rhasselbaum" wrote : I have tried specifying -Djboss.bind.address=<my_ip_address> at startup, but it does not seem to have any effect. And even if it did work, I need a solution that is DHCP-friendly because this is a development workstation.Using -b <your_ip> doesn't work either?
Anyway, it seems this problem is related to the /etc/hosts file on linux systems. In many installations I encountered the first line showed something like:
| 127.0.0.1 localhost.localdomain localhost <your_hostname>
|
This is probably what makes JBoss bind itself to 127.0.0.1. If you want to change this behaviour, just edit /etc/hosts to resemble something like this:
| 127.0.0.1 localhost.localdomain localhost
| <your_ip> <your_hostname>
|
This worked in all cases I encountered. Unfortunately I don't know how to fix this problem permanently when you're using DHCP, but I guess there is more information to be found on this subject on the Internet. Maybe just leave your hostname out of /etc/hosts?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004780#4004780
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004780
19 years, 3 months
[EJB 3.0] - ID-Handling
by hamtho2
Hi @all,
I have the following scenario: I´ve got a user-object that gets it´s ID through a @SequenceGenerator. Inside this user-object I´ve got an object VerificationCode. The ID of the VerificatinCode should be the same as the ID of the user, but the problem is, that I receive the id only while persisting, so I cannot instantiate the VerificationCode with a User-object and use it´s id with my getId()-method. One solution I found was to use the @PrePersist and do a MyVerificationObject.setId(myUserObject.getId()) in this method. But is this the way to go or is there a more elegant (object-oriented) way?
Thanks
Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004773#4004773
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004773
19 years, 3 months
[JBoss AOP] - AOP integration with JMX question
by bossy
Hi,
I posted this in the JMX forum first, but since nobody replyed I thougt I could try here as this is about AOP as well.
I need to create an aspect that can be managed by JMX. The idea is to use the aspect to obtain some stats(by intercepting calls) and to use JMX console to retrieve the stats.
I created an XMBean and I added methods wich I use as advices.
Everything works fine( the calls are intercepted and the XMBean is registered and accessible from the JMX console) with one exception - it seems that AOP and JMX create their own instances of the class. Aop intercepts the calls I make and updates the stats, but the XMBean values of the same stats(attributes) remain the same ( null in my case).
I tried to use separate XMBean and aspect classes, but the problem is that in order to use the XMBean methods to update my stats, I have to expose them and once I do this - they are available to the users in the JMX console.
My question is - is it possible to do write an Ascpect XMBean and if so - where should I look for more details.
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4004764#4004764
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4004764
19 years, 3 months