0 Replies Latest reply on Mar 11, 2014 6:29 PM by Sruj P

    Error in JPM6 Timer

    Sruj P Newbie


      We were using JBPM 5.4 till last release and migrated to JPM6 recently. Process flow is

       

      Start --> Script Task --> Timer --> Script Task --> End

       

      After adding Spring's SchedulerFactoryBean and no change in bpmn files, we get the below error.

       

      Caused by: javax.persistence.PersistenceException: error during managed flush

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

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

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

      at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:532)

      at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:235)

      ... 63 more

      Caused by: java.lang.RuntimeException: Unable to get session snapshot

      at org.drools.persistence.SessionMarshallingHelper.getSnapshot(SessionMarshallingHelper.java:67)

      at org.drools.persistence.info.SessionInfo.update(SessionInfo.java:85)

      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:597)

      at org.hibernate.ejb.event.BeanCallback.invoke(BeanCallback.java:37)

      at org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:94)

      at org.hibernate.ejb.event.EntityCallbackHandler.preUpdate(EntityCallbackHandler.java:79)

      at org.hibernate.ejb.event.EJB3FlushEntityEventListener.invokeInterceptor(EJB3FlushEntityEventListener.java:61)

      at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349)

      at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287)

      at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155)

      at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)

      at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)

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

      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)

      ... 66 more

      Caused by: java.io.NotSerializableException: java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)

      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)

      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)

      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)

      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)

      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)

      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)

      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

      at java.util.concurrent.CopyOnWriteArrayList.writeObject(CopyOnWriteArrayList.java:823)

      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:597)

      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)

      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)

      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

      at java.util.HashMap.writeObject(HashMap.java:1001)

      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:597)

      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)

      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)

      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)

      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)

      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

      at java.util.ArrayList.writeObject(ArrayList.java:570)

      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:597)

      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)

      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)

      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)

      at org.drools.core.marshalling.impl.SerializablePlaceholderResolverStrategy$SerializablePlaceholderStrategyContext.write(SerializablePlaceholderResolverStrategy.java:97)

      at org.drools.core.marshalling.impl.PersisterHelper.writeStrategiesIndex(PersisterHelper.java:220)

      at org.drools.core.marshalling.impl.PersisterHelper.writeToStreamWithHeader(PersisterHelper.java:200)

      at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.writeSession(ProtobufOutputMarshaller.java:123)

      at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:166)

      at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:148)

      at org.drools.persistence.SessionMarshallingHelper.getSnapshot(SessionMarshallingHelper.java:64)

      ... 84 more