4 Replies Latest reply on Feb 12, 2007 12:38 PM by warmonga

    Deploying and running Jbpm / Drools Process

    warmonga

      Hello,

      I have a problem running a deployed Jbpm process that fires some Drools rules in an ActionHandler. When testing the process through the Jbpm API, it runs perfectly fine, though.

      Unfortunately I could not find a helping hint for this issue on this forum or google.

      The part of the Jpdl processs where the ActionHandler is invoked looks as follows:

       <task-node name="Receive Return">
       <task name="Receive Item" swimlane="Shipping">
       <controller>
       <variable name="tracking number" access="read"></variable>
       <variable name="number" access="read,write,required"></variable>
       </controller>
       </task>
       <event type="node-leave">
       <action name="Execute Shipping Rules" class="com.sample.action.FireRulesActionHandler">
       <rulefile>Sample.drl</rulefile>
       </action>
       </event>
       <transition name="" to="node1">
       </transition>
       </task-node>
      


      As I said, when I execute the process through the Jbpm API, the process executes just fine, including the FireRulesActionHandler which fires all rules as it is supposed to. But when deploying the project to the server, it will deploy it, but during execution of the process, it would stop executing at that point where the ActionHandler is called. The server log looks as follows:


      11:33:04,385 DEBUG [GraphElement] event 'node-leave' on 'TaskNode(Receive Return
      )' for 'Token(/)'
      11:33:04,395 DEBUG [GraphElement] executing action 'action[Execute Shipping Rule
      s]'
      11:33:04,395 DEBUG [JbpmContext] closing JbpmContext
      11:33:04,395 DEBUG [Services] closing service 'persistence': org.jbpm.persistenc
      e.db.DbPersistenceService@f6981a
      11:33:04,395 DEBUG [DbPersistenceService] committing hibernate transaction
      11:33:04,405 DEBUG [DbPersistenceService] closing hibernate session
      11:33:04,405 DEBUG [Services] closing service 'logging': org.jbpm.logging.db.DbL
      oggingService@e4c30a
      11:33:04,405 DEBUG [Services] closing service 'authentication': org.jbpm.securit
      y.authentication.DefaultAuthenticationService@c0fb53
      11:33:04,405 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet t
      hrew exception
      javax.faces.FacesException: Error calling action method of component with id tas
      kform:transitionButton
      at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
      nListenerImpl.java:74)
      at javax.faces.component.UICommand.broadcast(UICommand.java:106)
      at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:9
      0)
      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
      64)
      at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(Lifecycl
      eImpl.java:271)
      at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
      :86)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFi
      lter.java:56)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
      ipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:159)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ssConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
      at java.lang.Thread.run(Unknown Source)
      Caused by: javax.faces.el.EvaluationException: Exception while invoking expressi
      on #{taskBean.saveAndClose}
      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java
      :153)
      at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
      nListenerImpl.java:63)
      ... 34 more
      Caused by: java.lang.NoClassDefFoundError: org/drools/RuleBase
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
      at java.lang.Class.getConstructor0(Unknown Source)
      at java.lang.Class.newInstance0(Unknown Source)
      at java.lang.Class.newInstance(Unknown Source)
      at org.jbpm.instantiation.FieldInstantiator.newInstance(FieldInstantiato
      r.java:103)
      at org.jbpm.instantiation.FieldInstantiator.instantiate(FieldInstantiato
      r.java:48)
      at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:163)
      at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:125)
      at org.jbpm.instantiation.Delegation$$FastClassByCGLIB$$6bae1598.invoke(
      <generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
      at org.jbpm.instantiation.Delegation$$EnhancerByCGLIB$$3c64f0ee.getInsta
      nce(<generated>)
      at org.jbpm.graph.def.Action.execute(Action.java:122)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
      at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)

      at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.ja
      va:182)
      at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
      at org.jbpm.graph.def.Node.leave(Node.java:371)
      at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:198)
      at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated
      >)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$56174330.leave(<generated>)

      at org.jbpm.graph.exe.Token.signal(Token.java:178)
      at org.jbpm.graph.exe.Token.signal(Token.java:123)
      at org.jbpm.graph.exe.Token$$FastClassByCGLIB$$74df1c6e.invoke(<generate
      d>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
      at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$e6e7aac4.signal(<generated
      >)
      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:441)
      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:355)
      at org.jbpm.taskmgmt.exe.TaskInstance$$FastClassByCGLIB$$cb2c21af.invoke
      (<generated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
      at org.jbpm.taskmgmt.exe.TaskInstance$$EnhancerByCGLIB$$fed0bc85.end(<ge
      nerated>)
      at org.jbpm.webapp.bean.TaskBean.saveAndClose(TaskBean.java:178)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java
      :129)
      ... 35 more
      11:33:06,618 DEBUG [JbpmContextInfo] creating jbpm context with service factorie
      s '[message, scheduler, logging, persistence, authentication]'
      11:33:06,618 DEBUG [JbpmContext] creating JbpmContext
      11:33:06,618 DEBUG [StaticNotifier] woke up
      11:33:06,628 DEBUG [DbPersistenceServiceFactory] creating persistence service
      11:33:06,628 DEBUG [DbPersistenceService] creating hibernate session


      I guess the line
      Caused by: java.lang.NoClassDefFoundError: org/drools/RuleBase

      is the essential one. Probably it's a problem concerning jar - files. But unfortunately I don't know which jar files are missing and how to include the missing jar files then. I am using the Jbpm server that came with the "jbpm-starters-kit-3.1.3".

      I appreciate any hint that could help me to solve this problem. Many thanks in advance!
      Best regards,
      Maurice