2 Replies Latest reply on Mar 4, 2009 5:07 AM by Mike Schulze

    org.hibernate.PersistentObjectException - after creating Tim

    Mike Schulze Newbie

      Hi,

      within my process-definition, I have two state-nodes. When the node-entry event occurs a timer is created. When the 1st timer is done it propagate to the 2nd node. After the propagation and the creation of the 2nd timer I get this exception.

      16:50:14,000 ERROR [GraphElement] action threw exception: uninitialized proxy passed to save()
      org.hibernate.PersistentObjectException: uninitialized proxy passed to save()
       at org.hibernate.event.def.DefaultSaveEventListener.reassociateIfUninitializedProxy(DefaultSaveEventListener.java:49)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:59)
       at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
       at org.jbpm.db.JobSession.saveJob(JobSession.java:99)
       at org.jbpm.scheduler.db.DbSchedulerService.createTimer(DbSchedulerService.java:43)
       at org.jbpm.scheduler.def.CreateTimerAction.execute(CreateTimerAction.java:79)
       at org.jboss.seam.bpm.SeamUserCodeInterceptor$1.process(SeamUserCodeInterceptor.java:80)
       at org.jboss.seam.bpm.SeamUserCodeInterceptor$ContextualCall.run(SeamUserCodeInterceptor.java:40)
       at org.jboss.seam.bpm.SeamUserCodeInterceptor.executeAction(SeamUserCodeInterceptor.java:74)
       at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:257)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
       at org.jbpm.graph.def.Node.enter(Node.java:302)
       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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.def.Node_$$_javassist_139.enter(Node_$$_javassist_139.java)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.node.State_$$_javassist_100.leave(State_$$_javassist_100.java)
       at org.jbpm.graph.exe.Token.signal(Token.java:192)
       at org.jbpm.graph.exe.Token.signal(Token.java:155)
       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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.graph.exe.Token_$$_javassist_154.signal(Token_$$_javassist_154.java)
       at org.jbpm.job.Timer.execute(Timer.java:93)
       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.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
       at org.jbpm.job.Job_$$_javassist_144.execute(Job_$$_javassist_144.java)
       at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:173)
       at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:64)
      
      tritt auf, wenn nach einem Timeraufruf auf einen Knoten weitergeleitet wird, bei dem im enter-nodee event ein neuer Timer erzeugt wird.


      The first timer is successfully deleted from the Job-Table after it was done.

      This is the part of my process-definition:

      <start-state name="startOrder">
       <transition to="waitForAddress"/>
       </start-state>
      
       <state name="waitForAddress">
       <event type="node-enter">
       <create-timer name="waitForAddress" duedate="#{professionalOrdermanagementTimerConfigurator.getWaitForAddress()}" transition="deliveryAddressSet">
       <action name="deadlineReached" expression="#{professionalOrdermanagementProcessController.deliveryAddressSet()}"></action>
       </create-timer>
       </event>
       <event type="node-leave">
       <cancel-timer name="waitForAddress"/>
       <action name="log" expression='#{professionalOrdermanagementProcessmanager.logInfo("leaveWaitForAddress")}'></action>
       </event>
       <transition to="waitForIncomingPayment" name="deliveryAddressSet"></transition>
       <transition to="reversal" name="cancelOrder"></transition>
       </state>
      
       <state name="waitForIncomingPayment">
       <event type="node-enter">
       <action name="log" expression='#{professionalOrdermanagementProcessmanager.logInfo("entering WaitForIncomingPayment...")}'></action>
       <create-timer name="waitForIncomingPayment" duedate="#{professionalOrdermanagementTimerConfigurator.getDueDate()}" transition="paymentOverdue">
       <action name="deadlineReachedNow" expression="#{professionalOrdermanagementPaymentProcesscontroller.deadlineReached()}"></action>
       </create-timer>
       </event>
       <event type="node-leave">
       <cancel-timer name="waitForIncomingPayment"/>
       </event>
       <transition to="orderDone" name="paymentReceived"></transition>
       <transition to="overdue" name="paymentOverdue"></transition>
       <transition to="reversal" name="cancelOrder"></transition>
       </state>
      ...
      


      I am using jBPM 3.2.3 Seam 2.1 and JBoss 4.2.2
      Does anybody why I get this exception?

      Thx Mike