0 Replies Latest reply on Dec 2, 2008 4:36 PM by geertsp

    examples ex04_1 ex04_2 ... fail on second run

    geertsp

      Hello,

      trying to become more familiar with EJB3.0 in combination with JBoss.
      Using jboss-4.2.3.GA / JDK 1.6.0_07 and ant.
      Installation and running Jboss was no problem. (Using all the defaults as to server config, databses etc)
      Building ex04_1 with ant also no difficulties. I can see in my (Jboss) dos box that deployment of the bean also succeeded.

      First question is where I can see in the web Gui that this is actually the case. Sofar I have seen pages of 'standard' jboss components but haven't been able to locate my own little travelagent bean.

      Running the client side of this example first time gives the expected results. However running it the second time gives a consistent dump which is as follows :

      run.client:
      [java] Exception in thread "main" java.lang.RuntimeException: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
      [java] at org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)
      [java] at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:180)
      [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
      [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      [java] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
      [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
      [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
      [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
      [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
      [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
      [java] Caused by: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
      [java] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1401)
      [java] at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
      [java] at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
      [java] at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
      [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
      [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      [java] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
      [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
      [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
      [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
      [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
      [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
      [java] at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
      [java] at org.jboss.remoting.Client.invoke(Client.java:1634)
      [java] at org.jboss.remoting.Client.invoke(Client.java:548)
      [java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
      [java] at $Proxy0.createCabin(Unknown Source)
      [java] at com.titan.clients.Client.main(Client.java:30)
      [java] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
      [java] at $Proxy0.createCabin(Unknown Source)
      [java] at com.titan.clients.Client.main(Client.java:30)
      [java] Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
      [java] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
      [java] at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:524)
      [java] at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
      [java] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
      [java] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
      [java] at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
      [java] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
      [java] at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
      [java] at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
      [java] at org.jboss.aspects.tx.TxPolicy.endTransaction(TxPolicy.java:175)
      [java] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:87)
      [java] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
      [java] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
      [java] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      [java] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
      [java] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
      [java] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      [java] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
      [java] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
      [java] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
      [java] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
      [java] Caused by: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
      [java] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
      [java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
      [java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      [java] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
      [java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
      [java] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
      [java] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
      [java] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      [java] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
      [java] at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
      [java] at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
      [java] ... 29 more
      [java] Caused by: java.sql.BatchUpdateException: failed batch
      [java] at org.hsqldb.jdbc.jdbcStatement.executeBatch(Unknown Source)
      [java] at org.hsqldb.jdbc.jdbcPreparedStatement.executeBatch(Unknown Source)
      [java] at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeBatch(CachedPreparedStatement.java:476)
      [java] at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)
      [java] at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
      [java] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
      [java] ... 36 more


      Anyone any ideas ??


      Thanks

      Peter Geerts