[jboss-user] [EJB 3.0] - Exception in Distributed transaction in EJB3.0

ajayks do-not-reply at jboss.com
Mon Oct 20 02:25:19 EDT 2008


Hello All,
I  am evaluating distributed  trransaction using JBOSS4.2.2.
I have  oracle9i database X and  another oracle 9i database Y.
Both the databse X and Y is located in the diffrent country and machine.
I want to  make changes in the databas X and database Y in one transaction.
I have created a stateles session bean and using entity bean I tried to update the both database X and Y in one transaction.
But I am getting following exeception at run time :-


  | 11:36:51,117 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 at c0c6f6
  | 11:36:51,126 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null
  | 11:36:51,126 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: -35fe69f3:d89f:48fc1fc2:31
  |  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: -35fe69f3:d89f:48fc1fc2:31 status: ActionStatus.ABORT_ONLY >))
  | 11:36:51,127 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
  | org.hibernate.exception.GenericJDBCException: Cannot open connection
  |         at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
  |         at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
  |         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  |         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
  |         at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
  |         at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
  |         at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94)
  |         at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
  |         at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:222)
  |         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2224)
  |         at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2660)
  |         at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:56)
  |         at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
  |         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
  |         at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
  |         at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
  |         at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
  |         at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
  | exception in thread "main" java.lang.IllegalStateException: BaseTransaction.rollback - [com.arjuna.ats.internal.jta.transaction.arjunacore.notx] [com.arjuna.ats.internal.jta.transaction.arjunacore.notx] no transaction!
  | at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.rollback(BaseTransaction.java:158)
  | at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:126)
  | at org.jboss.ejb3.tx.UserTransactionImpl.rollback(UserTransactionImpl.java:91)
  | at itac.ccc.server.ASServerComp.callASService(ASServerComp.java:59)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
  | at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
  | at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.ejb3.tx.BMTInterceptor.handleStateless(BMTInterceptor.java:71)
  | at org.jboss.ejb3.tx.BMTInterceptor.invoke(BMTInterceptor.java:131)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
  | at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
  | at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
  | at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
  | at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
  | at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
  | at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
  | at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
  | at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
  | at org.jboss.remoting.Client.invoke(Client.java:1634)
  | at org.jboss.remoting.Client.invoke(Client.java:548)
  | at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
  | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
  | 

Can any one help me out why I am not able to complete the distributed transaction. As per EJB3.0 specification, EJB3.0 should support the distributed transaction.
Thnaks a lot in advance for your help in this matter.

with best  regards,
Ajay Kumar,
ST Microelectronics Ltd.
India.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183115#4183115

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183115



More information about the jboss-user mailing list