[JBoss jBPM] - Compliation Error in parsing process definition xml from jav
by ssidhanta
Hi,
I am stuck with this problem for quite sometime.
I am calling a JBPM process from a java class using the following code:
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.parseResource("jbpm.cfg.xml");
//ProcessDefinition processDefinition=ProcessDefinition.parseXmlResource("simple.par/processdefinition.xml");
ProcessDefinition processDefinition=ProcessDefinition.parseXmlResource("D:/jbpm-starters-kit-3.1.2/jbpm/src/process.examples/26thJuneProject/processes/simple/processdefinition.xml");
I am getting this compilation error:
org.jbpm.jpdl.JpdlException: [[ERROR] couldn't parse process definition]
at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:163)
at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:153)
at com.sample.CallProcess.testCallProcess(CallProcess.java:16)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Please help me solve this problem?
thanks in anticipation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164923#4164923
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164923
17 years, 8 months
[JBoss jBPM] - Re: Error when calling a process from a java class
by ssidhanta
Hi,
I was busy doing other things.So could not reply.But I am still getting the error:
org.jbpm.jpdl.JpdlException: [[ERROR] couldn't parse process definition]
at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:163)
at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:153)
at com.sample.CallProcess.testCallProcess(CallProcess.java:16)
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 junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Thanks in anticipation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164920#4164920
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164920
17 years, 8 months
[JBoss jBPM] - Re: Error in jbpm 3.2.3?
by xigua
First of all, I should have pointed out that I tried both jbpm 3.2.2 and 3.2.3 and the example websale app worked out of box on 3.2.2 but not 3.2.3 on me. My apologies on that.
Secondly, Ronald, yes, you are rude to have this kind of tone toward people seeking help. It's not helping.
I did search on google before posting the questions and I think the first one is more or less an INFO but rather an ERROR. "09:52:46,875 ERROR [STDERR] Jul 14, 2008 9:52:46 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit
INFO: Added Library from: jar:file:/C:/tools/jbpm-jpdl-3.2.3/server/server/jbpm/tmp/deploy/tmp14048jbpm-console-exp.war/WEB-INF/lib/gravel.jar!/META-INF/gravel-compat.taglib.xml"
For the second one, I know what it means and that's why I put my java version number in there. However, I do not want to try different java version to figure out which one is appropriate. This issue might not be in the jbpm core library, might be some 3rd party jars included. However, it's not mentioned in the release note and the sample application of 3.2.2 worked but not 3.2.3.
Anyway, I think jBPM as a product (not just the core library) and I am evaluating it to see whether it's a good solid product. In my opinion, jbpm 3.2.3 includes a sample application, which should run out of the box, but it doesn't. I am raising these two issues I observed here if people already know the answer, which I could not find in google.
-xigua
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164824#4164824
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164824
17 years, 8 months
[JBoss jBPM] - jboss error with servlet and jbpm-console
by ashishc
Hi All,
I created a simple workflow with one node which just prints out the message. I deployed this in jbpm using eclipse and then tested it through the UI..http://localhost:8080/jbpm-console and all looks good.
here is the WF xml
<?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="urn:jbpm.org:jpdl-3.2"
| name="first-demo-process">
| <start-state name="start-state1">
| <transition to="node1"></transition>
| </start-state>
| <node name="node1">
| <action class="com.sample.action.MessageActionHandler">
| <message>ashish sending message1</message>
| </action>
| <transition to="end-state1"></transition>
| </node>
| <end-state name="end-state1"></end-state>
| </process-definition>
Now I created a servlet and deployed that, which hopefully will invoke the WF described above..here is the code for that..
package com.ashish.test;
|
| import java.io.IOException;
| import java.io.PrintWriter;
| import javax.servlet.ServletException;
| import javax.servlet.http.HttpServlet;
| import javax.servlet.http.HttpServletRequest;
| import javax.servlet.http.HttpServletResponse;
|
| import java.util.HashMap;
| import org.jbpm.JbpmConfiguration;
| import org.jbpm.JbpmContext;
| import org.jbpm.db.GraphSession;
| import org.jbpm.graph.def.ProcessDefinition;
| import org.jbpm.graph.exe.ProcessInstance;
|
| public class WFTriggerServlet extends HttpServlet {
| /**
| * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
| * @param request servlet request
| * @param response servlet response
| */
| protected void processRequest(HttpServletRequest request, HttpServletResponse response)
| throws ServletException, IOException {
| response.setContentType("text/html;charset=UTF-8");
| PrintWriter out = response.getWriter();
| try {
| out.println("inside processRequest function");
| out.println(startProcess(16, "first-demo-process", null, null, true));
| out.println("Ending call");
| } finally {
| out.close();
| }
| }
|
| public long startProcess(long processId, String processName, String key, HashMap processVariables, boolean signalStart) {
| long tokenId = 0;
| JbpmConfiguration jbpmConfig = null;
| JbpmContext jbpmContext = null;
| try {
|
| if (jbpmConfig == null) {
| jbpmConfig = JbpmConfiguration.getInstance();
| }
| jbpmContext = jbpmConfig.createJbpmContext();
| } catch (Exception e) {
| return -1; //e.getMessage().toString();
| }
| try {
| // get the session and process definition according to the process id
| GraphSession graphSession = jbpmContext.getGraphSession();
|
| ProcessDefinition processDefinition = null;
| if (processName.length() > 0) {
| processDefinition = graphSession.findLatestProcessDefinition(processName);
| } else {
| processDefinition = graphSession.getProcessDefinition(processId);
| }
|
| // if there are no process variables, then create an empty variable list
| if (processVariables == null) {
| processVariables = new HashMap();
| }
| // startup the process, set its business key (for correlation purposes, and
| // signal it to start going with the flow
| ProcessInstance processInstance = processDefinition.createProcessInstance(processVariables);
|
| processInstance.setKey(key);
| tokenId = processInstance.getRootToken().getId();
| if (signalStart) {
| processInstance.signal();
| }
| } finally {
| jbpmContext.close();
| }
| return tokenId;
| }
| }
|
I copied the .war file for the servlet to /opt/software/jbpm-jpdl-3.2.3/server/server/jbpm/deploy/
and i see this on the console...
09:57:20,150 INFO [TomcatDeployer] deploy, ctxPath=/WFTrigger, warUrl=.../tmp/deploy/tmp21005WFTrigger-exp.war/
| 09:57:20,697 INFO [WebappClassLoader] validateJarFile(/opt/software/jbpm-jpdl-3.2.3/server/server/jbpm/./tmp/deploy/tmp21005WFTrigger-exp.war/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Now when I try to hit http://localhost:8080/jbpm-console/sa/processes.jsf I am not able to view the JBPM page also and am getting this error on the console...
09:58:29,248 INFO [STDOUT] 09:58:29,248 INFO [JbpmConfiguration] using jbpm configuration resource 'jbpm.cfg.xml'
| 10:00:06,746 WARN [lifecycle] executePhase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@62a404) threw exception
| javax.faces.application.ViewExpiredException: viewId:/sa/processes.jsf - View /sa/processes.jsf could not be restored.
| at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| 10:00:06,749 WARN [lifecycle] phase(RESTORE_VIEW 1,com.sun.faces.context.FacesContextImpl@62a404) threw exception: java.lang.NullPointerException null
| org.jboss.gravel.common.phase.GravelPhaseListener.afterPhase(GravelPhaseListener.java:112)
| com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| java.lang.Thread.run(Thread.java:619)
|
| 10:00:06,749 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
| javax.faces.application.ViewExpiredException: viewId:/sa/processes.jsf - View /sa/processes.jsf could not be restored.
| at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
|
Can anyone please help me with this ? Its really confusing for me as i am doing it for the first time....
Thanks
Ashish
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164783#4164783
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164783
17 years, 8 months