1 Reply Latest reply on Sep 26, 2011 4:42 AM by Shobhit Tyagi

    jbpm4 integration with webapp

    Shobhit Tyagi Master

      Hi,

       

      I am trying to add workflow to an application.

       

      I am able to deploy the process. But when I call the method to start the process, following trace appears :

       

      javax.servlet.ServletException: Servlet execution threw an exception
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      root cause

      java.lang.NoClassDefFoundError: de/odysseus/el/util/SimpleResolver
           org.jbpm.pvm.internal.script.JuelScriptEngineFactory.getScriptEngine(JuelScriptEngineFactory.java:185)
           javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:205)
           org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:111)
           org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:90)
           org.jbpm.pvm.internal.model.ExecutionImpl.resolveAssignmentExpression(ExecutionImpl.java:772)
           org.jbpm.pvm.internal.model.ExecutionImpl.initializeAssignments(ExecutionImpl.java:726)
           org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:95)
           org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:58)
           org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
           org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
           org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
           org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217)
           org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:61)
           org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
           org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
           org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
           org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
           org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
           org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
           org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
           org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceById(ExecutionServiceImpl.java:50)
           action.AllMethods.startNewProcessInstance(AllMethods.java:31)
           action.MainServlet.doPost(MainServlet.java:51)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      root cause

      java.lang.ClassNotFoundException: de.odysseus.el.util.SimpleResolver from BaseClassLoader@aee53f{VFSClassLoaderPolicy@4cbcaf{name=vfszip:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war domain=ClassLoaderDomain@17fc253{name=vfszip:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war parentPolicy=AFTER_BUT_JAVA_BEFORE parent=ClassLoaderDomain@1568654{DefaultDomain}} roots=[MemoryContextHandler@33014755[path= context=vfsmemory://3j001-x2aob1-godzmi30-1-godzmrc7-1x real=vfsmemory://3j001-x2aob1-godzmi30-1-godzmrc7-1x], ZipEntryHandler@22908657[path=CustomJBPM4.war/WEB-INF/classes context=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/ real=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war/WEB-INF/classes], DelegatingHandler@22253751[path=CustomJBPM4.war/WEB-INF/lib/jbpm.jar context=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/ real=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war/WEB-INF/lib/jbpm.jar], ZipEntryHandler@21097047[path=CustomJBPM4.war/WEB-INF context=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/ real=file:/home/Shobhit/Install/jboss-5.0.0.GA/server/default/deploy/CustomJBPM4.war/WEB-INF]]  delegates=null exported=[, org.jbpm.jpdl.internal.repository, org.jbpm.pvm.internal.identity.cmd, META-INF.maven.org.jbpm.jbpm4.jbpm-log, org.jbpm.pvm.internal.job, org.jbpm.api.history, META-INF.maven.org.jbpm.jbpm4.jbpm-pvm, org.jbpm.pvm.internal.history, org.jbpm.pvm.internal.wire.usercode, org.jbpm.pvm.internal.wire, org.jbpm.api.model, org.jbpm.api.task, org.jbpm.jpdl.internal.rules, org.jbpm.pvm.internal.cal, org.jbpm.pvm.internal.wire.xml, org.jbpm.pvm.internal.wire.binding, org.jbpm.test, org.jbpm.pvm.internal.repository, action, org.jbpm.pvm.internal.lob, org.jbpm.bpmn.flownodes, META-INF.maven.org.jbpm.jbpm4.jbpm-enterprise, org.jbpm.api.activity, org.jbpm.pvm.internal.stream, org.jbpm.bpmn.model, org.jbpm.bpmn.parser, org.jbpm.bpmn.deployer, org.jbpm.test.assertion, org.jbpm.pvm.internal.spring, org.jbpm.pvm.internal.task, org.jbpm.pvm.internal.id, org.jbpm.enterprise.internal.ejb, org.jbpm.internal.log, org.jbpm.pvm.internal.query, org.jbpm.enterprise.internal.wire.binding, org.jbpm.pvm.internal.history.events, org.jbpm.pvm.internal.xml, org.jbpm.pvm.internal.env, org.jbpm.pvm.internal.wire.descriptor, org.jbpm.pvm.internal.util, org.jbpm.pvm.internal.cfg, org.jbpm.jpdl.internal.activity, org.jbpm.jpdl.internal.model, META-INF.maven.org.jbpm.jbpm4.jbpm-bpmn, META-INF.maven.org.jbpm.jbpm4.jbpm-jpdl, org.jbpm.api.jpdl, org.jbpm.pvm.internal.ant, org.jbpm.pvm.internal.type, META-INF.maven.org.jbpm.jbpm4.jbpm-api, org.jbpm.pvm.internal.model, org.jbpm.api.cmd, org.jbpm.bpmn.common, org.jbpm.pvm.internal.type.variable, org.jbpm.api, org.jbpm.api.listener, org.jbpm.pvm.internal.hibernate, org.jbpm.pvm.internal.migration, org.jbpm.pvm.internal.model.op, org.jbpm.pvm.internal.jobexecutor, org.jbpm.pvm.internal.test, org.jbpm.pvm.internal.email.impl, org.jbpm.pvm.internal.jms, org.jbpm.pvm.internal.history.model, org.jbpm.pvm.internal.svc, org.jbpm.pvm.internal.wire.operation, org.jbpm.pvm.internal.script, org.jbpm.pvm.internal.processengine, org.jbpm.pvm.internal.type.matcher, org.jbpm.pvm.internal.identity.impl, META-INF.maven.org.jbpm.jbpm4.jbpm-test-base, org.jbpm.pvm.internal.cmd, org.jbpm.jpdl.internal.xml, org.jbpm.pvm.internal.tx, org.jbpm.api.job, org.jbpm.pvm.internal.email.spi, org.jbpm.pvm.internal.type.converter, META-INF, org.jbpm.pvm.internal.builder, META-INF.services, org.jbpm.test.jms, org.jbpm.test.ejb, org.jbpm.pvm.internal.session, org.jbpm.pvm.internal.identity.spi, org.jbpm.api.identity, org.jbpm.pvm.internal.client] <IMPORT-ALL>NON_EMPTY}}
           org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:385)
           java.lang.ClassLoader.loadClass(ClassLoader.java:252)
           java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
           org.jbpm.pvm.internal.script.JuelScriptEngineFactory.getScriptEngine(JuelScriptEngineFactory.java:185)
           javax.script.ScriptEngineManager.getEngineByName(ScriptEngineManager.java:205)
           org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:111)
           org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:90)
           org.jbpm.pvm.internal.model.ExecutionImpl.resolveAssignmentExpression(ExecutionImpl.java:772)
           org.jbpm.pvm.internal.model.ExecutionImpl.initializeAssignments(ExecutionImpl.java:726)
           org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:95)
           org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:58)
           org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
           org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
           org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
           org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217)
           org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:61)
           org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
           org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
           org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
           org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
           org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
           org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
           org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
           org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceById(ExecutionServiceImpl.java:50)
           action.AllMethods.startNewProcessInstance(AllMethods.java:31)
           action.MainServlet.doPost(MainServlet.java:51)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

       

      This is what the method to start the process looks like :

       

      public String startNewProcessInstance(String processDefID)

          {

              ProcessEngine processEngine = Configuration.getProcessEngine();

              ExecutionService executionService = processEngine.getExecutionService();

              ProcessInstance processInstance = executionService.startProcessInstanceById(processDefID);

              String processInstID = processInstance.getId();

              return processInstID;

             

          }

       

      The process instance is however successfully initiated. Gets listed in the database.

       

      Please help because I cant go ahead if this is nt resolved.

       

      regds.