[jboss-user] [JBoss jBPM] - Process variable class cast exception after signal()

jglan do-not-reply at jboss.com
Mon Jan 29 12:49:23 EST 2007


I have a process running fine until it reaches wait-state.
Each action node gets and sets some process variable without any problem.
The next action node (after the wait-state) throws class cast exception when attempting to get the same process variable (which was no problem in the nodes before the wait-state)
Is there any problem known in this area ?
I use a lot JMS i.e. the signal is send from some JMS thread via calling some SLSB. 
I use jbpm 3.1.2
anonymous wrote : 
  | Here is some output of the logging when everything works fine:
  | (2 process instances retrieving  'control' variable)
  | 
  | 2007-01-29 18:10:25,625 DEBUG [.....jbpm.handler.ActionHandlerTemplate] contextInstanceId=0
  | 2007-01-29 18:10:25,625 DEBUG [.....jbpm.handler.ActionHandlerTemplate] contextInstanceId=0
  | 2007-01-29 18:10:25,625 DEBUG [.....jbpm.handler.ActionHandlerTemplate] retrieving control variable : control  processInstanceId=62
  | 2007-01-29 18:10:25,625 DEBUG [.....jbpm.handler.ActionHandlerTemplate] retrieving control variable : control  processInstanceId=63
  | 2007-01-29 18:10:25,625 DEBUG [.....jbpm.handler.ActionHandlerTemplate] class of context var=class .....common.jbpm.ProcessVariableProteinIDControl
  | 2007-01-29 18:10:25,625 DEBUG [.....jbpm.handler.ActionHandlerTemplate] class of context var=class .....common.jbpm.ProcessVariableProteinIDControl
  | 2007-01-29 18:10:25,625 DEBUG [.....jbpm.handler.ActionHandlerTemplate] retrieving context variable : context  processInstanceId=62
  | 2007-01-29 18:10:25,625 DEBUG [.....jbpm.handler.ActionHandlerTemplate] retrieving context variable : context  processInstanceId=63
  | 

After sending the signal the same steps (getting the  variable) gives the following:

the class returned from context.getContextInstance().getVariable has changed and obviously cannot be cast to the type expected (which was working before).
Also getContextInstance().getId() now has a value > 0 for some reason...

anonymous wrote : 
  | 2007-01-29 18:10:25,969 DEBUG [org.jbpm.graph.def.GraphElement] event 'before-signal' on 'State(waitforSlot)' for 'Token(/)'
  | 2007-01-29 18:10:25,969 DEBUG [org.jbpm.graph.def.GraphElement] event 'before-signal' on 'State(waitforSlot)' for 'Token(/)'
  | 2007-01-29 18:10:25,969 DEBUG [org.jbpm.graph.def.GraphElement] event 'node-leave' on 'State(waitforSlot)' for 'Token(/)'
  | 2007-01-29 18:10:25,969 DEBUG [org.jbpm.graph.def.GraphElement] event 'node-leave' on 'State(waitforSlot)' for 'Token(/)'
  | 2007-01-29 18:10:25,969 DEBUG [org.jbpm.graph.def.GraphElement] event 'transition' on 'Transition()' for 'Token(/)'
  | 2007-01-29 18:10:25,969 DEBUG [org.jbpm.graph.def.GraphElement] event 'transition' on 'Transition()' for 'Token(/)'
  | 2007-01-29 18:10:25,984 DEBUG [org.jbpm.graph.def.GraphElement] event 'node-enter' on 'Node(pullResult)' for 'Token(/)'
  | 2007-01-29 18:10:25,984 DEBUG [org.jbpm.graph.def.GraphElement] event 'node-enter' on 'Node(pullResult)' for 'Token(/)'
  | 2007-01-29 18:10:25,984 DEBUG [.....jbpm.handler.PullResultActionHandler] pullResultActionHandler starting...
  | 2007-01-29 18:10:25,984 DEBUG [.....jbpm.handler.PullResultActionHandler] pullResultActionHandler starting...
  | 2007-01-29 18:10:26,000 DEBUG [.....jbpm.handler.ActionHandlerTemplate] contextInstanceId=114
  | 2007-01-29 18:10:26,000 DEBUG [.....jbpm.handler.ActionHandlerTemplate] contextInstanceId=115
  | 2007-01-29 18:10:26,000 DEBUG [.....jbpm.handler.ActionHandlerTemplate] retrieving control variable : control  processInstanceId=63
  | 2007-01-29 18:10:26,000 DEBUG [.....jbpm.handler.ActionHandlerTemplate] retrieving control variable : control  processInstanceId=62
  | 2007-01-29 18:10:26,000 DEBUG [.....jbpm.handler.ActionHandlerTemplate] class of context var=class org.jbpm.bytes.ByteArray$$EnhancerByCGLIB$$c35f0bd6
  | 2007-01-29 18:10:26,000 DEBUG [.....jbpm.handler.ActionHandlerTemplate] class of context var=class org.jbpm.bytes.ByteArray$$EnhancerByCGLIB$$c35f0bd6
  | 2007-01-29 18:10:26,000 ERROR [.....jbpm.handler.ActionHandlerTemplate] Got Exception executing node action. processInstanceId=62
  | java.lang.ClassCastException: org.jbpm.bytes.ByteArray$$EnhancerByCGLIB$$c35f0bd6 cannot be cast to .....common.jbpm.ProcessVariableProteinIDControl
  | 	at .....jbpm.handler.ActionHandlerTemplate.execute(ActionHandlerTemplate.java:45)
  | 	at .....jbpm.handler.PullResultActionHandler.execute(PullResultActionHandler.java:35)
  | 	at org.jbpm.graph.def.Action.execute(Action.java:123)
  | 	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.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | 	at org.jbpm.graph.def.Action$$EnhancerByCGLIB$$226d945.execute()
  | 	at org.jbpm.graph.def.Node.execute(Node.java:328)
  | 	at org.jbpm.graph.def.Node.enter(Node.java:316)
  | 	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.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | 	at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$864c9e11.enter()
  | 	at org.jbpm.graph.def.Transition.take(Transition.java:119)
  | 	at org.jbpm.graph.def.Node.leave(Node.java:383)
  | 	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.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | 	at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$864c9e11.leave()
  | 	at org.jbpm.graph.exe.Token.signal(Token.java:174)
  | 	at org.jbpm.graph.exe.Token.signal(Token.java:123)
  | 	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.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
  | 	at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$32db44a5.signal()
  | 	at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)
  | 	at .....services.control.WorkflowServiceImpl$JbpmSignaler.doInJbpm(WorkflowServiceImpl.java:155)
  | 	at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:86)
  | 	at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:367)
  | 	at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
  | 	at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:79)
  | 	at .....services.control.WorkflowServiceImpl.handleSendSignal(WorkflowServiceImpl.java:217)
  | 	at .....services.control.WorkflowServiceBase.sendSignal(WorkflowServiceBase.java:53)
  | 	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)
  | 	
  | ...
  | ...
  | ...
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007918#4007918

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007918



More information about the jboss-user mailing list