3 Replies Latest reply on Jan 13, 2009 12:32 AM by dhanushgopinath

    Class Cast Exception while the BPEL Process Ends

    dhanushgopinath

      Hi,

      I am instantiating a BPEL process through the JBPM-BPEL API's. Everything works well and even the last task is getting executed. But after that I am getting this class cast exception .

      The trace is as given.

      12:21:52,950 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.variable.def.MessageType - this operation breaks ==
      12:21:53,075 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.scope.Scope - this operation breaks ==
      12:21:53,137 ERROR [GraphElement] action threw exception: $Proxy63
      java.lang.ClassCastException: $Proxy63
       at org.jbpm.bpel.scheduler.ejbtimer.EjbSchedulerServiceFactory.getSchedulerControlHome(EjbSchedulerServiceFactory.java:50)
       at org.jbpm.bpel.scheduler.ejbtimer.EjbSchedulerService.<init>(EjbSchedulerService.java:49)
       at org.jbpm.bpel.scheduler.ejbtimer.EjbSchedulerServiceFactory.openService(EjbSchedulerServiceFactory.java:60)
       at org.jbpm.svc.Services.getService(Services.java:144)
       at org.jbpm.svc.Services.getCurrentService(Services.java:91)
       at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:329)
       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.ProcessInstance_$$_javassist_349.end(ProcessInstance_$$_javassist_349.java)
       at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:332)
       at org.jbpm.graph.exe.Token.end(Token.java:304)
       at org.jbpm.graph.exe.Token.end(Token.java:254)



      Its probably trying to look up the jndi name schedulerControlHomeName and so gettting a class cast exception.

      Do I need to add this property somewhere? If so where? Also any ide why is this property used.

      Thanks
      Dhanush

        • 1. Re: Class Cast Exception while the BPEL Process Ends
          dhanushgopinath

          Hi,

          Inorder to solve this problem, I tried upgrading my jbpm bpel instance to 1.1.1

          I ran my process and now it throws a slightly different exception.

          17:52:39,153 ERROR [GraphElement] action threw exception: org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory
          java.lang.ClassCastException: org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory
           at org.jbpm.svc.Services.getServiceFactory(Services.java:131)
           at org.jbpm.svc.Services.getService(Services.java:148)
           at org.jbpm.svc.Services.getCurrentService(Services.java:94)
           at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:328)
           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)


          Now its looking throwing class cast exception for the class EntitySchedulerServiceFactory.

          Can I some how disable it, as I do not need the scheduler service in my application?

          If so What should be done so that I can disable it ? Will commenting of the line
          <service name="scheduler" factory="org.jbpm.scheduler.ejbtimer.EntitySchedulerServiceFactory" />


          in jbpm.cfg.xml suffice ?

          Please let me know.

          Thanks
          Dhanush

          • 2. Re: Class Cast Exception while the BPEL Process Ends
            aguizar

            Commenting out the line will disable the scheduler service, but I'm curious as to why you get the exception. Several provided examples use the scheduler service and work correctly.

            When you updated jbpm-bpel.jar, did you update the dependencies as well? In particular you should check that jbpm-jpdl.jar is at version 3.2.3. The manifest file contains the version information. If you did not update the dependencies, make sure you use the jar from the BPEL distro.

            • 3. Re: Class Cast Exception while the BPEL Process Ends
              dhanushgopinath

              THanks Alex,

              I could resolve this issue earlier and it was a dependency issue only.

              But now I am getting a different error for JNDI Lookup.

              Its throws an error saying

              ejb timer entity lookup problem


              Do i need to register these lookups somewhere?