1 Reply Latest reply on Sep 25, 2012 2:09 AM by Sumeeth Tewar

    Jboss AS 6.1.0 final : Issue with persisting Timers.

    Sumeeth Tewar Newbie

      I am getting a strange error when persisting timers, actually this does not happen all the time, but is randomly seen after hours of working fine.

      The stacktrace is as follows :

       

      2012-09-24 01:45:04,710 ERROR [org.hornetq.ra.inflow.HornetQMessageHandler] Failed to deliver message

      java.lang.reflect.UndeclaredThrowableException

              at $Proxy1843.afterDelivery(Unknown Source)

              at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:287)

              at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:866)

              at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:44)

              at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:983)

              at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

              at java.lang.Thread.run(Thread.java:662)

      Caused by: javax.resource.ResourceException: javax.transaction.RollbackException: ARJUNA-16053 Could not commit transaction.

              at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.after(MessageInflowLocalProxy.java:263)

              at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)

              ... 9 more

      Caused by: javax.transaction.RollbackException: ARJUNA-16053 Could not commit transaction.

              at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1170)

              at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119)

              at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

              at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.endTransaction(MessageInflowLocalProxy.java:464)

              at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.finish(MessageInflowLocalProxy.java:343)

              at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.after(MessageInflowLocalProxy.java:259)

              ... 10 more

      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1215)

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1148)

              at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1154)

              at org.hibernate.ejb.AbstractEntityManagerImpl$3.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1068)

              at org.hibernate.transaction.synchronization.CallbackCoordinator.beforeCompletion(CallbackCoordinator.java:122)

              at org.hibernate.transaction.synchronization.HibernateSynchronizationImpl.beforeCompletion(HibernateSynchronizationImpl.java:51)

              at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:97)

              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:274)

              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:94)

              at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159)

              at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1158)

              ... 15 more

      Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)

              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)

              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)

              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)

              at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)

              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)

              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)

              at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)

              at org.hibernate.transaction.synchronization.CallbackCoordinator.beforeCompletion(CallbackCoordinator.java:117)

              ... 21 more

      Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into timer (info, initialDate, nextDate, previousRun, repeatInterval, timedObjectId, timerState, id) values ('<stream of 2033 bytes>', '2012-09-24 02:16:04.442000 -06:00:00', '2012-09-24 02:16:04.442000 -06:00:00', NULL, '1860000', 'jboss.j2ee:ear=Exampleenterprise.ear,jar=example-mgmt-ejb.jar,name=ExampleTimerBean,service=EJB3', '2', 'd789f6cd-c6d3-43a1-b35c-d2946701cf84') was aborted.  Call getNextException to see the cause.

              at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2598)

              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)

              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407)

              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2737)

              at sun.reflect.GeneratedMethodAccessor1705.invoke(Unknown Source)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:455)

              at $Proxy780.executeBatch(Unknown Source)

              at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)

              at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)

              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)

              ... 28 more

       

       

       

      Is there a bug with the Timer Implementation?

        • 1. Re: Jboss AS 6.1.0 final : Issue with persisting Timers.
          Sumeeth Tewar Newbie

          Also i missed another log :

           

          2012-09-24 01:46:30,602 ERROR [org.hibernate.util.JDBCExceptionReporter] (Thread-16 (group:HornetQ-client-global-threads-1673773006)) Batch entry 12 insert into timer (info, initialDate, nextDate, previousRun, repeatInterval, timedObjectId, timerState, id) values ('<stream of 2034 bytes>', '2012-09-24 02:17:28.405000 -06:00:00', '2012-09-24 02:17:28.405000 -06:00:00', NULL, '1860000', 'jboss.j2ee:ear=Exampleenterprise.ear,jar=example-mgmt-ejb.jar,name=ExampleTimerBean,service=EJB3', '0', '617fb354-3dc6-405f-b8bc-141e104eb2ae') was aborted.  Call getNextException to see the cause.

          2012-09-24 01:46:30,602 ERROR [org.hibernate.util.JDBCExceptionReporter] (Thread-16 (group:HornetQ-client-global-threads-1673773006)) ERROR: duplicate key value violates unique constraint "timer_pkey"

           

           

          how can this constraint be violated sometimes and other times it works fine?