cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti - Error parsing XML - ' Could not validate XML with BPMN 2.0 XSD'

prashant_kumar
Champ in-the-making
Champ in-the-making
Hi,
I am new to Activiti. I am trying to write "Hello World". I am getting the error parsing the BPMN xml file.

Please help.
Here is the XML:

<?xml version="1.0" encoding="UTF-8"?>
   <definitions id="definitions"xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL'targetNamespace='http://www.activiti.org/bpmn2.0">
        <process id="helloWorld">
……

</definitions>

Here is the error:
<?xml version="1.0" encoding="UTF-8"?>
   <definitions id="definitions"xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL'targetNamespace='http://www.activiti.org/bpmn2.0">
        <process id="helloWorld">
2 REPLIES 2

prashant_kumar
Champ in-the-making
Champ in-the-making
XML :
<?xml version="1.0" encoding="UTF-8"?>
   <definitions id="definitions"xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL'targetNamespace='http://www.activiti.org/bpmn2.0">
        <process id="helloWorld">

StackTrace:
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: Element type "definitions" must be followed by either attribute specifications, ">" or "/>".

frederikherema1
Star Contributor
Star Contributor
Can you add the XML in code-tags please? Anyway, make sure the XML is valid, seems like a syntax-error rather than an XSD-error… Try validating the syntax in your tool of choice first.