2 Replies Latest reply on Dec 11, 2009 7:57 PM by Ronald van Kuijk

    Process Step Exception

    Divyansh Verma Newbie

      I got following exception when i move from one step to another
      Error signalling token: An exception of type "java.lang.ClassCastException" was thrown. The message is: org.jbpm.msg.jms.JmsMessageServiceFactory cannot be cast to org.jbpm.svc.ServiceFactory

      Now its a simple process where in it will collect some data at start step and will move on for approvals before closing. But the this process breaks at step 2 with the above exception.

      I am using jbpm 3.2.6SP1 with Jboss 5.0. Please help.


        • 1. Re: Process Step Exception
          guancio Newbie

          I got the same exception using jbpm 3.2 on JBoss 5. After 4 hours of investigation I've found that my development approach was not correct.

          The main cause of the problem was that I was trying to use the JBPM enterprise installation from a Web Application deployed on the same JBoss container. My first attempt was to add the jbpm-identity and jbpm-jpdl jars as J2EE module dependencies and deploy them inside WEB-INF/lib of my War.

          Initially, this step was required to avoid class not found exception while accessing to the jbpm structures.

          I think that the java.lang.ClassCastException occurred because the interface of org.jbpm.msg.jms.JmsMessageServiceFactory is not present inside jbpm-identity and jbpm-jpdl jars. Instead the interface is located inside the jbpm-enterprise.jar directory.
          Namely, I think that Java run-time raises the exception because jbpm-enterprise.jar is loaded by a different Java class loader.

          I solved my problem as follows:

          I removed jbpm-* jars from my WEB-INF/lib deployment
          I deployed the war of my application inside deploy/jbpm directory of JBoss, instead of deploy. This avoid the class not found exceptions
          I added the web.xml and jboss-web.xml deployment descriptors inside my WEB-INF directory, using the contents described in http://docs.jboss.com/jbpm/v3.2/userguide/html_single/#clientcomponents. This avoid jms name not bound exceptions.

          I think that JBoss documentation on how to use jbpm from Web and enterprise applications really lacks details and a good tutorial.

          • 2. Re: Process Step Exception
            Ronald van Kuijk Master


            I think that JBoss documentation on how to use jbpm from Web and enterprise applications really lacks details and a good tutorial.

            Partly yes, partly no. The issues are no different than with any other ready to use war/ear vs repackaging.

            If you find the time, you might write a blog about it or a wiki page (within jbpm) so it get's written down somewhere. Heck you might even contribute a paragraph to the normal docs. We'd really appreciate that ;-)