1 Reply Latest reply on Jan 18, 2007 4:12 PM by Frank Zartmann

    Exception when calling a bpel-process with wait statement

    Frank Zartmann Newbie

      Hello,

      I have a simple bpel process definition:

      <?xml version="1.0" encoding="UTF-8"?>
      <bpws:process xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
       xmlns:ns="http://www.kiag.comArtifacts"
       xmlns:ns0="http://target.namespace"
       xmlns:tns="http://www.kiag.com"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       exitOnStandardFault="yes"
       name="Starter"
       suppressJoinFailure="no"
       targetNamespace="http://www.kiag.com">
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
       location="Starter.wsdl" namespace="http://www.kiag.com"/>
      <bpws:import importType="http://www.w3.org/2001/XMLSchema"
       location="bundleentry://288/cache/www.w3.org/2001/XMLSchema.xsd"
       namespace="http://www.w3.org/2001/XMLSchema"/>
      <bpws:partnerLinks>
      <bpws:partnerLink myRole="StarterProvider" name="client" partnerLinkType="tns:Starter"/>
      </bpws:partnerLinks>
      <bpws:variables>
      <bpws:variable messageType="tns:StarterRequestMessage" name="input"/>
      <bpws:variable messageType="tns:StarterResponseMessage" name="output"/>
      </bpws:variables>
      <bpws:sequence name="main">
      <bpws:receive createInstance="yes"
       name="receiveInput"
       operation="process"
       partnerLink="client"
       portType="tns:Starter"
       variable="input"/>
      <bpws:assign name="Assign" validate="no">
      <bpws:copy>
      <bpws:from>
      <bpws:literal>Hello</bpws:literal>
      </bpws:from>
      <bpws:to part="response" variable="output">
      <bpws:query queryLanguage="http://www.w3.org/TR/1999/REC-xpath-19991116">
       <![CDATA[/tns:result]]>
      </bpws:query>
      </bpws:to>
      </bpws:copy>
      </bpws:assign>
      <bpws:wait>
      <bpws:for><![CDATA['PT20S']]></bpws:for>
      </bpws:wait>
      <bpws:reply name="replyOutput"
       operation="process"
       partnerLink="client"
       portType="tns:Starter"
       variable="output"/>
      </bpws:sequence>
      </bpws:process>

      This process contains a receive with a reply and I instantiate the output variable 'output' with "Hello". There is a wait statement between assign and reply waiting 20 seconds.
      I created this process with the bpel designer. I can deploy this definition and I can start this process calling the Starter webservice. But then an exception is thrown in the applicarion server:
      22:44:22,057 ERROR [StartListener] could not start process instance
      java.lang.IllegalAccessException: Class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer can not access a member of class org.jbpm.bpel.sublang.def.Snippet with modifiers "public"
       at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
       at java.lang.reflect.Method.invoke(Method.java:578)
       at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:205)
       at org.jbpm.bpel.sublang.def.Expression_$$_javassist_94.getText(Expression_$$_javassist_94.java)
       at org.jbpm.bpel.alarm.Alarm.toString(Alarm.java:145)
       at java.lang.String.valueOf(String.java:2615)
       at java.lang.StringBuffer.append(StringBuffer.java:220)
       at org.jbpm.bpel.alarm.Alarm.createTimer(Alarm.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:205)
       at org.jbpm.bpel.alarm.Alarm_$$_javassist_1.createTimer(Alarm_$$_javassist_1.java)
       at org.jbpm.bpel.def.Wait.execute(Wait.java:46)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
       at org.jbpm.graph.def.Transition.take(Transition.java:119)
       at org.jbpm.graph.def.Node.leave(Node.java:383)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
       at org.jbpm.bpel.def.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
       at org.jbpm.graph.def.Transition.take(Transition.java:119)
       at org.jbpm.graph.def.Node.leave(Node.java:383)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:57)
       at org.jbpm.bpel.def.Receive.accept(Receive.java:82)
       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:205)
       at org.jbpm.bpel.def.Receive_$$_javassist_30.accept(Receive_$$_javassist_30.java)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:97)
       at org.jbpm.bpel.def.Sequence.accept(Sequence.java:105)
       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:205)
       at org.jbpm.bpel.def.Activity_$$_javassist_11.accept(Activity_$$_javassist_11.java)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:43)
       at org.jbpm.bpel.def.BpelDefinition.messageReceived(BpelDefinition.java:109)
       at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:115)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:696)
       at java.lang.Thread.run(Thread.java:595)
      

      I do not know why this wait statement causes this exception.

      A second question: I have changed the bpel process several times and have
      deployed the definition each time. Is it necessary to restart the application server each time?
      I have recognized that the changes have not taken effect after the deployment. The behaviour was different only after an additional restart of the application server .

      My environment: jbpm-bpel-1.1.Beta2.zip

      Many thanks in advance,

      Frank