cancel
Showing results for 
Search instead for 
Did you mean: 

Could not validate XML with BPMN 2.0 XSD in Activiti 5.13

denis1
Champ in-the-making
Champ in-the-making
I'm developing simple application using JDK7, Eclipse Juno, Tomcat 7.0.41 and Activity Engine 5.13, but following exception raises when I try to deploy simple-approval.bpmn20.xml (or any other):


org.activiti.engine.ActivitiException: Error parsing XML
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:195)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:42)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:68)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:33)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:74)
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:134)
   at gateway.ui.ProcessEngineServletContextListener.deployProcesses(ProcessEngineServletContextListener.java:107)
   at gateway.ui.ProcessEngineServletContextListener.contextInitialized(ProcessEngineServletContextListener.java:37)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
   at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
   at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
   at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
   at java.util.concurrent.FutureTask.run(FutureTask.java:166)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.RuntimeException: Could not validate XML with BPMN 2.0 XSD
   at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:230)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:181)
   … 21 more
Caused by: org.xml.sax.SAXParseException; systemId: file:/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/work/Catalina/localhost/ui/loader/org/activiti/impl/bpmn/parser/BPM...; lineNumber: 15; columnNumber: 70; src-resolve: Cannot resolve the name 'extension' to a(n) 'element declaration' component.
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
   at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
   at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
   at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLocal(Unknown Source)
   at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements(Unknown Source)
   at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
   at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
   at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
   at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:591)
   at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:623)
   at org.activiti.bpmn.converter.BpmnXMLConverter.createSchema(BpmnXMLConverter.java:182)
   at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:161)
   at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:219)
   … 22 more


Activiti Explorer with same workflow configuration under Tomcat 7.0.41 works fine. Any ideas on how to resolve these errors?
7 REPLIES 7

jbarrez
Star Contributor
Star Contributor
Have you got a simple way I can try reproduce? How are you deploying to Tomcat?

sharat
Champ in-the-making
Champ in-the-making
Hi jbarraz,

I am facing the same Issue. We generated the model and tried to deploy using the Activiti API. earliest help would be really helfpful.
Below is the BPMN xml:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="WF22a08cf3ba21474a85caafb18ed89448" name="TestWorkflowDeployment" isExecutable="true">
    <subProcess id="harmony-workflow-inner-process" name="Error Checked Process">
      <startEvent id="0" name="Start"></startEvent>
      <scriptTask id="0_runtimeinit" name="Initialize Runtime" activiti:async="true" scriptFormat="JavaScript" activiti:autoStoreVariables="false">
        <script>execution.setVariable("harmony_workflow_org", "BG_SERVICE_ORG")
execution.setVariable("harmony_workflow_user", "ActivitiUser1")
execution.setVariable("harmony_workflow_id", "workflow123")
</script>
      </scriptTask>
      <sequenceFlow id="sequenceFlow-e0d9b4b4-bc64-434a-8658-34bba262e09b" sourceRef="0" targetRef="0_runtimeinit"></sequenceFlow>
      <serviceTask id="1" name="Notification" activiti:async="true" activiti:expression="#{notifyTask.run(execution, &quot;SUCCESS&quot;, array.fromStrings())}"></serviceTask>
      <endEvent id="1_end" name="End"></endEvent>
      <sequenceFlow id="sequenceFlow-312aff07-2d55-4823-86d8-9af3242c936e" sourceRef="1" targetRef="1_end"></sequenceFlow>
      <serviceTask id="5" name="Download File" activiti:async="true" activiti:expression="#{fileDownloadTask.run(execution, &quot;5&quot;, harmony_workflow_pass_through, &quot;[ProfileId,CustomerKey,EmailAddress,FirstName,LastName,City]&quot;, &quot;TestExport&quot;,&quot;DELIMITED&quot;, &quot;|&quotSmiley Wink}"></serviceTask>
      <exclusiveGateway id="5_gw" name="Status Check"></exclusiveGateway>
      <sequenceFlow id="sequenceFlow-29259fae-547a-4e4d-9dbd-d6fb042b680b" sourceRef="5" targetRef="5_gw"></sequenceFlow>
      <sequenceFlow id="sequenceFlow-256c88b1-e80b-40ae-8141-d404e2b4c1ee" sourceRef="5_gw" targetRef="5_poll">
        <conditionExpression xsi:type="tFormalExpression"><![CDATA[${5_status != 'P'}]]></conditionExpression>
      </sequenceFlow>
      <intermediateCatchEvent id="5_poll" name="Poll job">
        <timerEventDefinition>
          <timeDuration>PT15S</timeDuration>
        </timerEventDefinition>
      </intermediateCatchEvent>
      <sequenceFlow id="sequenceFlow-b2ded646-a5eb-43dd-89c1-34c60db3de76" sourceRef="5_poll" targetRef="5_check"></sequenceFlow>
      <serviceTask id="5_check" name="Retrieve Status" activiti:async="true" activiti:expression="#{fileDownloadPollTask.run(execution, &quot;5&quotSmiley Wink}"></serviceTask>
      <sequenceFlow id="sequenceFlow-952aef7f-7a03-4578-ba1e-4b61d8a4bb62" sourceRef="5_check" targetRef="5_gw"></sequenceFlow>
      <scriptTask id="6" name="Pass-through is f013f551-23ef-4d4e-968a-2025d3b5e854" scriptFormat="JavaScript" activiti:autoStoreVariables="false">
        <script>execution.setVariable("harmony_workflow_pass_through", "f013f551-23ef-4d4e-968a-2025d3b5e854")
</script>
      </scriptTask>
      <sequenceFlow id="T0" sourceRef="0_runtimeinit" targetRef="6"></sequenceFlow>
      <sequenceFlow id="T1" sourceRef="5_gw" targetRef="1"></sequenceFlow>
      <sequenceFlow id="T2" sourceRef="6" targetRef="5"></sequenceFlow>
    </subProcess>
    <startEvent id="0_outer" name="Start Outer Process"></startEvent>
    <sequenceFlow id="sequenceFlow-9d49373c-c016-4466-9fcd-d6ba50ebc04b" sourceRef="0_outer" targetRef="harmony-workflow-inner-process"></sequenceFlow>
    <endEvent id="1_outer" name="End Outer Process"></endEvent>
    <sequenceFlow id="sequenceFlow-5f3c6132-ea24-4cb5-b15d-bc4968f4f21d" sourceRef="harmony-workflow-inner-process" targetRef="1_outer"></sequenceFlow>
    <endEvent id="SYSTEM_GlobalExceptionHandler" name="Global Exception Handler">
      <errorEventDefinition errorRef="GlobalError"></errorEventDefinition>
    </endEvent>
    <serviceTask id="SYSTEM_GlobalExceptionHandler_notify" name="Notification" activiti:async="true" activiti:expression="#{notifyTask.run(execution, &quot;FAILURE&quot;, array.fromStrings())}"></serviceTask>
    <sequenceFlow id="sequenceFlow-239a6523-f362-4f4c-a0d8-1ce636b776d0" sourceRef="SYSTEM_GlobalExceptionHandler_notify" targetRef="SYSTEM_GlobalExceptionHandler"></sequenceFlow>
    <boundaryEvent id="global-error-event" name="Global Error Event" attachedToRef="harmony-workflow-inner-process">
      <errorEventDefinition></errorEventDefinition>
    </boundaryEvent>
    <sequenceFlow id="sequenceFlow-ba2939ca-96a6-4ec3-a01d-b8b115d696cd" sourceRef="global-error-event" targetRef="SYSTEM_GlobalExceptionHandler_notify"></sequenceFlow>
  </process>
<bpmndi:BPMNDiagram id="BPMNDiagram_WF22a08cf3ba21474a85caafb18ed89448">
    <bpmndi:BPMNPlane bpmnElement="WF22a08cf3ba21474a85caafb18ed89448" id="BPMNPlane_WF22a08cf3ba21474a85caafb18ed89448">
      <bpmndi:BPMNShape bpmnElement="5_check" id="BPMNShape_5_check">
        <omgdc:Bounds height="60.0" width="100.0" x="870.0" y="62.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="1" id="BPMNShape_1">
        <omgdc:Bounds height="60.0" width="100.0" x="720.0" y="250.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="0" id="BPMNShape_0">
        <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="144.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="6" id="BPMNShape_6">
        <omgdc:Bounds height="60.0" width="100.0" x="330.0" y="128.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="5_poll" id="BPMNShape_5_poll">
        <omgdc:Bounds height="30.0" width="30.0" x="755.0" y="20.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="5" id="BPMNShape_5">
        <omgdc:Bounds height="60.0" width="100.0" x="480.0" y="125.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="1_end" id="BPMNShape_1_end">
        <omgdc:Bounds height="30.0" width="30.0" x="905.0" y="265.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="0_runtimeinit" id="BPMNShape_0_runtimeinit">
        <omgdc:Bounds height="60.0" width="100.0" x="180.0" y="129.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="5_gw" id="BPMNShape_5_gw">
        <omgdc:Bounds height="40.0" width="40.0" x="630.0" y="131.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="0_outer" id="BPMNShape_0_outer">
        <omgdc:Bounds height="30.0" width="30.0" x="0.0" y="150.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="1_outer" id="BPMNShape_1_outer">
        <omgdc:Bounds height="30.0" width="30.0" x="1040.0" y="150.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="global-error-event" id="BPMNShape_global-error-event">
        <omgdc:Bounds height="30.0" width="30.0" x="793.0" y="315.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="harmony-workflow-inner-process" id="BPMNShape_harmony-workflow-inner-process" isExpanded="true">
        <omgdc:Bounds height="330.0" width="910.0" x="80.0" y="0.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="SYSTEM_GlobalExceptionHandler_notify" id="BPMNShape_SYSTEM_GlobalExceptionHandler_notify">
        <omgdc:Bounds height="60.0" width="100.0" x="0.0" y="390.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="SYSTEM_GlobalExceptionHandler" id="BPMNShape_SYSTEM_GlobalExceptionHandler">
        <omgdc:Bounds height="30.0" width="30.0" x="150.0" y="405.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-b2ded646-a5eb-43dd-89c1-34c60db3de76" id="BPMNEdge_sequenceFlow-b2ded646-a5eb-43dd-89c1-34c60db3de76">
        <omgdi:waypoint x="785.0" y="35.0"></omgdi:waypoint>
        <omgdi:waypoint x="832.0" y="35.0"></omgdi:waypoint>
        <omgdi:waypoint x="832.0" y="92.0"></omgdi:waypoint>
        <omgdi:waypoint x="870.0" y="92.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-e0d9b4b4-bc64-434a-8658-34bba262e09b" id="BPMNEdge_sequenceFlow-e0d9b4b4-bc64-434a-8658-34bba262e09b">
        <omgdi:waypoint x="130.0" y="159.0"></omgdi:waypoint>
        <omgdi:waypoint x="180.0" y="159.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-256c88b1-e80b-40ae-8141-d404e2b4c1ee" id="BPMNEdge_sequenceFlow-256c88b1-e80b-40ae-8141-d404e2b4c1ee">
        <omgdi:waypoint x="670.0" y="141.0"></omgdi:waypoint>
        <omgdi:waypoint x="682.0" y="141.0"></omgdi:waypoint>
        <omgdi:waypoint x="682.0" y="35.0"></omgdi:waypoint>
        <omgdi:waypoint x="755.0" y="35.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-312aff07-2d55-4823-86d8-9af3242c936e" id="BPMNEdge_sequenceFlow-312aff07-2d55-4823-86d8-9af3242c936e">
        <omgdi:waypoint x="820.0" y="280.0"></omgdi:waypoint>
        <omgdi:waypoint x="905.0" y="280.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-29259fae-547a-4e4d-9dbd-d6fb042b680b" id="BPMNEdge_sequenceFlow-29259fae-547a-4e4d-9dbd-d6fb042b680b">
        <omgdi:waypoint x="580.0" y="155.0"></omgdi:waypoint>
        <omgdi:waypoint x="592.0" y="155.0"></omgdi:waypoint>
        <omgdi:waypoint x="592.0" y="151.0"></omgdi:waypoint>
        <omgdi:waypoint x="630.0" y="151.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="T1" id="BPMNEdge_T1">
        <omgdi:waypoint x="670.0" y="161.0"></omgdi:waypoint>
        <omgdi:waypoint x="682.0" y="161.0"></omgdi:waypoint>
        <omgdi:waypoint x="682.0" y="280.0"></omgdi:waypoint>
        <omgdi:waypoint x="720.0" y="280.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-952aef7f-7a03-4578-ba1e-4b61d8a4bb62" id="BPMNEdge_sequenceFlow-952aef7f-7a03-4578-ba1e-4b61d8a4bb62">
        <omgdi:waypoint x="870.0" y="104.0"></omgdi:waypoint>
        <omgdi:waypoint x="858.0" y="104.0"></omgdi:waypoint>
        <omgdi:waypoint x="858.0" y="151.0"></omgdi:waypoint>
        <omgdi:waypoint x="630.0" y="151.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="T0" id="BPMNEdge_T0">
        <omgdi:waypoint x="280.0" y="159.0"></omgdi:waypoint>
        <omgdi:waypoint x="292.0" y="159.0"></omgdi:waypoint>
        <omgdi:waypoint x="292.0" y="158.0"></omgdi:waypoint>
        <omgdi:waypoint x="330.0" y="158.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="T2" id="BPMNEdge_T2">
        <omgdi:waypoint x="430.0" y="158.0"></omgdi:waypoint>
        <omgdi:waypoint x="442.0" y="158.0"></omgdi:waypoint>
        <omgdi:waypoint x="442.0" y="155.0"></omgdi:waypoint>
        <omgdi:waypoint x="480.0" y="155.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-5f3c6132-ea24-4cb5-b15d-bc4968f4f21d" id="BPMNEdge_sequenceFlow-5f3c6132-ea24-4cb5-b15d-bc4968f4f21d">
        <omgdi:waypoint x="990.0" y="165.0"></omgdi:waypoint>
        <omgdi:waypoint x="1040.0" y="165.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-239a6523-f362-4f4c-a0d8-1ce636b776d0" id="BPMNEdge_sequenceFlow-239a6523-f362-4f4c-a0d8-1ce636b776d0">
        <omgdi:waypoint x="100.0" y="420.0"></omgdi:waypoint>
        <omgdi:waypoint x="150.0" y="420.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-9d49373c-c016-4466-9fcd-d6ba50ebc04b" id="BPMNEdge_sequenceFlow-9d49373c-c016-4466-9fcd-d6ba50ebc04b">
        <omgdi:waypoint x="30.0" y="165.0"></omgdi:waypoint>
        <omgdi:waypoint x="42.0" y="165.0"></omgdi:waypoint>
        <omgdi:waypoint x="42.0" y="165.0"></omgdi:waypoint>
        <omgdi:waypoint x="80.0" y="165.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-ba2939ca-96a6-4ec3-a01d-b8b115d696cd" id="BPMNEdge_sequenceFlow-ba2939ca-96a6-4ec3-a01d-b8b115d696cd">
        <omgdi:waypoint x="808.0" y="345.0"></omgdi:waypoint>
        <omgdi:waypoint x="808.0" y="460.0"></omgdi:waypoint>
        <omgdi:waypoint x="50.0" y="460.0"></omgdi:waypoint>
        <omgdi:waypoint x="50.0" y="450.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>


jbarrez
Star Contributor
Star Contributor
Is that the whole xml? I can only see a part, no sequence flow etc. Can you post the complete process xml?

prashant_kumar
Champ in-the-making
Champ in-the-making
Hi Joram, I am also getting the "Could not validate XML with BPMN 2.0 XSD" error with Activiti 5.13. I am just trying to run "Hello World" on activiti. I am not using Activiti Explorer or any other modules/war. I am using jdk1.7.

<code><?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions"
             targetNamespace="http://activiti.org/bpmn20
             xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:activiti="http://activiti.org/bpmn">

        <process id="helloWorld" name="helloWorld">
              <startEvent id="start" />
                   <sequenceFlow id="flow1" sourceRef="start" targetRef="script" />
                        <scriptTask id="script" name="HelloWorld" scriptFormat="groovy">
                               <script>         System.out.println("Hello world")     
                                </script>    
                        </scriptTask>   
<sequenceFlow id="flow2" sourceRef="script" targetRef="theEnd" />
     <endEvent id="theEnd" />  
     </process>
    </definitions>  </code>
Exception in thread "main" org.activiti.engine.ActivitiException: Error parsing XML

at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:195)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:42)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:68)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:33)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:74)
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:134)
at com.demo.Demo.main(Demo.java:22)
Caused by: java.lang.RuntimeException: Could not validate XML with BPMN 2.0 XSD
at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:230)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:181)
… 10 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 33; Element type "definitions" must be followed by either attribute specifications, ">" or "/>"

trademak
Star Contributor
Star Contributor
Hi,

I tried to parse the same XML and it works fine for me. Can you create a unit test so that we can reproduce your issue?
Are you using the Oracle JDK or another one?

Best regards,

pachera_simone
Champ in-the-making
Champ in-the-making
Hi,
I'm having the same error when I try to deploy activiti-explorer.war 5.14 the first time on a fresh instance of tomcat 7.0.50 (but tried also with 6.0.45) and on Win 8.1 and JDK 1.7.0.45 (but tried also with (1.6.0.45).

Have you figured out what could be the reason for this error?

This is the tomcat log:
<code>
gen 14, 2014 3:49:21 PM org.apache.catalina.core.ApplicationContext log
Informazioni: No Spring WebApplicationInitializer types detected on classpath
gen 14, 2014 3:49:21 PM org.apache.catalina.core.ApplicationContext log
Informazioni: Initializing Spring root WebApplicationContext
gen 14, 2014 3:49:23 PM org.apache.catalina.core.StandardContext listenerStart
Grave: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoDataGenerator' defined in ServletContext resource [/WEB-INF/activiti-standalone-context.xml]: Invocation of init method failed; nested exception is org.activiti.engine.ActivitiException: Error parsing XML
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4961)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5455)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1074)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.activiti.engine.ActivitiException: Error parsing XML
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:195)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:86)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:42)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:68)
at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:33)
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:75)
at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:139)
at org.activiti.explorer.demo.DemoDataGenerator.initProcessDefinitions(DemoDataGenerator.java:191)
at org.activiti.explorer.demo.DemoDataGenerator.init(DemoDataGenerator.java:74)
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.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
… 25 more
Caused by: java.lang.RuntimeException: Could not validate XML with BPMN 2.0 XSD
at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:231)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:181)
… 48 more
Caused by: org.xml.sax.SAXParseException; systemId: file:/C:/Users/user-pc/Documents/Università/Stage/apache-tomcat-7.0.50/work/Catalina/localhost/activiti-explorer/loader/org/activiti/impl/bpmn/parser/BPMN20.xsd; lineNumber: 15; columnNumber: 70; src-resolve: impossibile risolvere il nome "extension" in un componente element declaration.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseLocal(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseLocalElements(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
at javax.xml.validation.SchemaFactory.newSchema(Unknown Source)
at javax.xml.validation.SchemaFactory.newSchema(Unknown Source)
at org.activiti.bpmn.converter.BpmnXMLConverter.createSchema(BpmnXMLConverter.java:183)
at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:162)
at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:220)
… 49 more

gen 14, 2014 3:49:23 PM org.apache.catalina.core.ApplicationContext log
Informazioni: Closing Spring root WebApplicationContext
gen 14, 2014 3:49:26 PM org.apache.catalina.core.ApplicationContext log
Informazioni: ContextListener: contextInitialized()
gen 14, 2014 3:49:26 PM org.apache.catalina.core.ApplicationContext log
Informazioni: SessionListener: contextInitialized()
gen 14, 2014 3:49:26 PM org.apache.catalina.core.ApplicationContext log
Informazioni: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@2edaec86')
</code>


thanks
Simone

SOLVED! the error was in reading the path of the folder (.. / Università / ..). To fix it just move the folder of the apache server to a new directory with a path without special characters.

Thanks

Simone