0 Replies Latest reply on May 19, 2009 2:27 AM by jeffery c

    JBPM4 - Asyn_continous problem, asyncExecute activity failed

    jeffery c Newbie

      hello everyone,
      i've defined a process like this:

      ClientProcessDefinition p = ProcessDefinitionBuilder.startProcess("test")
      
       .startActivity("start", StartActivity.class)
       .transition("fork", "fork")
       .initial()
       .endActivity()
      
       .startActivity("fork", ForkActivity.class)
       .transition("one", "one")
       .transition("two", "two")
       .endActivity()
      
       .startActivity("one", OneActivity.class)
       .asyncExecute() // asyncExecute
       .transition("join", "join")
       .endActivity()
       .startActivity("two", OneActivity.class)
       .asyncExecute() // asyncExecute
       .transition("join", "join")
       .endActivity()
      
       .startActivity("join", JoinActivity.class)
       .transition("end", "end")
       .needsPrevious()
       .endActivity()
      
       .startActivity("end", EndActivity.class)
       .endActivity()
      
       .endProcess();


      i deployed the process definition and then tested it via the executionService, exception occurs:
      ### EXCEPTION ###########################################
      2009-05-19 11:09:43,906 SEV | [JobExecutorThread] exception in job executor thread
      org.hibernate.WrongClassException: Object with id: 11 was not of the specified subclass: org.jbpm.pvm.internal.job.TimerImpl (loaded object was of wrong class class org.jbpm.pvm.internal.model.op.ExecuteActivityMessage)
       at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:1243)
       at org.hibernate.loader.Loader.getRow(Loader.java:1195)
       at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
       at org.hibernate.loader.Loader.doQuery(Loader.java:701)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
       at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
       at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
       at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
       at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63)
       at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
       at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
       at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
       at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
       at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:213)
       at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:202)
       at org.hibernate.engine.CascadingAction.getAllElementsIterator(CascadingAction.java:415)
       at org.hibernate.engine.CascadingAction.access$100(CascadingAction.java:27)
       at org.hibernate.engine.CascadingAction$1.getCascadableChildrenIterator(CascadingAction.java:125)
       at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:294)
       at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
       at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
       at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
       at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
       at org.hibernate.event.def.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:307)
       at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:246)
       at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:141)
       at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:775)
       at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:758)
       at org.hibernate.engine.Cascade.deleteOrphans(Cascade.java:355)
       at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:324)
       at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
       at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
       at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
       at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
       at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
       at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
       at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
       at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
       at org.jbpm.pvm.internal.tx.HibernateSessionResource.prepare(HibernateSessionResource.java:57)
       at org.jbpm.pvm.internal.tx.StandardTransaction.commit(StandardTransaction.java:109)
       at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:68)
       at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:64)
       at org.jbpm.pvm.internal.service.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:41)
       at org.jbpm.pvm.internal.service.RetryInterceptor.execute(RetryInterceptor.java:37)
       at org.jbpm.pvm.internal.jobexecutor.JobExecutorThread.run(JobExecutorThread.java:66)

      anyone help me...