Cristóvão Neto [
http://community.jboss.org/people/netocris] created the document:
"couldn't parse process definition"
To view the document, visit:
http://community.jboss.org/docs/DOC-17031
--------------------------------------------------------------
Hi,
I have a problem with the deploy process definition functinality with jBPM API.
I need to deploy a process definition programmatically to jBPM.
I have the next code:
1. The string file points to webapp classpath (web/WEB-INF/classes/...)
String file = "jbpm/testews/testews.jpdl.xml";
ProcessDefinition processDefinition =
ProcessDefinition.parseXmlResource(file);
2. The string path point to absolut file path (ex:
C:\test\jbpm\testews/testews.jpdl.xml)
String path = FileManagerFactory.getDefaultEngine().getFolder();
File f1 = new File(path + "testews.jpdl.xml");
ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource(f1);
1. works fine
2. don't work
When i try the 2nd option ProcessDefinition processDefinition =
ProcessDefinition.parseXmlResource(f1) throws the following exception:
IPDMS[2011-07-13 16:49:57] ERROR (JpdlXmlReader.java:167) couldn't parse process
definition
org.dom4j.DocumentException: null Nested exception: null
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:58)
at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:141)
at
org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:180)
at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:161)
at
com.sinfic.ipdms.tramitacao.jbpm.service.JbpmService.deployProcessDefinition(JbpmService.java:78)
at
com.sinfic.ipdms.tramitacao.jbpm.WorkflowWrapper.deployProcessWorkflow(WorkflowWrapper.java:306)
at
com.sinfic.ipdms.services.entity.impl.ProcessoCRUDService.deployProcessIntoWorkflow(ProcessoCRUDService.java:159)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy13.deployProcessIntoWorkflow(Unknown Source)
at com.sinfic.ipdms.webservices.entity.ProcessoWS.create(ProcessoWS.java:40)
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.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.sinfic.ipdms.integration.struts.filter.StrutsTransactionFilter.doFilter(StrutsTransactionFilter.java:58)
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:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Nested exception:
java.net.MalformedURLException
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:58)
at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:141)
at
org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:180)
at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:161)
at
com.sinfic.ipdms.tramitacao.jbpm.service.JbpmService.deployProcessDefinition(JbpmService.java:78)
at
com.sinfic.ipdms.tramitacao.jbpm.WorkflowWrapper.deployProcessWorkflow(WorkflowWrapper.java:306)
at
com.sinfic.ipdms.services.entity.impl.ProcessoCRUDService.deployProcessIntoWorkflow(ProcessoCRUDService.java:159)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy13.deployProcessIntoWorkflow(Unknown Source)
at com.sinfic.ipdms.webservices.entity.ProcessoWS.create(ProcessoWS.java:40)
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.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.sinfic.ipdms.integration.struts.filter.StrutsTransactionFilter.doFilter(StrutsTransactionFilter.java:58)
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:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Why?
I'm using jbpm 3.2.2 and dom4j jar files in the webapp libs.
The jBPM API have any issue with the absolute paths?
The ProcessDefinition.parseXmlResource only works with path that are in accessible with
classpath?
sorry my poor english,
thanks in advance
Cristóvão Neto
--------------------------------------------------------------
Comment by going to Community
[
http://community.jboss.org/docs/DOC-17031]
Create a new document in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=102&am...]