cancel
Showing results for 
Search instead for 
Did you mean: 

Error instantiating 5.10 process definition in 5.12

mmaker1234
Champ in-the-making
Champ in-the-making
Hello Activiti developers,

I have a process definition developed with Activiti Designer 5.10 (for Activiti Engine 5.10). This definition is deployed and used to run flawlessly with Activiti Engine 5.10 and 5.11. Now I'm running Activiti Engine 5.12 and any attempt to instantiate the process definition leads to the following:
INFO | 2013-03-14 16:53:41.057 (1363272821057) | ExecuteThread: '2' for queue: 'default' | org.activiti.engine.impl.bpmn.deployer.BpmnDeployer | deploy
Processing resource MyProcess.MyProcess.png

INFO | 2013-03-14 16:53:41.058 (1363272821058) | ExecuteThread: '2' for queue: 'default' | org.activiti.engine.impl.bpmn.deployer.BpmnDeployer | deploy
Processing resource MyProcess.bpmn
ERROR:  ''

SEVERE | 2013-03-14 16:53:41.294 (1363272821294) | ExecuteThread: '2' for queue: 'default' | org.activiti.engine.impl.interceptor.CommandContext | close
Error while closing command context
org.activiti.engine.ActivitiException: Error parsing XML
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:181)
        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.persistence.deploy.DeploymentManager.resolveProcessDefinition(DeploymentManager.java:95)
        at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedLatestProcessDefinitionByKey(DeploymentManager.java:69)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:64)
        at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:36)
        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.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:60)
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
        at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:62)
        …
Caused by: java.lang.RuntimeException: Could not validate XML with BPMN 2.0 XSD
        at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:206)
        at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:170)
        … 60 more
Caused by: javax.xml.transform.TransformerException: java.lang.UnsupportedOperationException
        at com.sun.org.apache.xerces.internal.jaxp.validation.StAXValidatorHelper.validate(StAXValidatorHelper.java:98)
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:118)
        at javax.xml.validation.Validator.validate(Validator.java:127)
        at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:173)
        at org.activiti.bpmn.converter.BpmnXMLConverter.convertToBpmnModel(BpmnXMLConverter.java:198)
        … 61 more
Caused by: javax.xml.transform.TransformerException: java.lang.UnsupportedOperationException
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:732)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:336)
        at com.sun.org.apache.xerces.internal.jaxp.validation.StAXValidatorHelper.validate(StAXValidatorHelper.java:94)
        … 65 more
Caused by: java.lang.UnsupportedOperationException
        at weblogic.xml.stax.XMLStreamReaderBase.getTextCharacters(XMLStreamReaderBase.java:515)
        at com.sun.org.apache.xalan.internal.xsltc.trax.StAXStream2SAX.handleCharacters(StAXStream2SAX.java:261)
        at com.sun.org.apache.xalan.internal.xsltc.trax.StAXStream2SAX.bridge(StAXStream2SAX.java:171)
        at com.sun.org.apache.xalan.internal.xsltc.trax.StAXStream2SAX.parse(StAXStream2SAX.java:120)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:674)
        at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:723)
        … 67 more
Referring to the message "Could not validate XML with BPMN 2.0 XSD" I should note that the server, where the engine is running, is not allowed to connect to the Internet.

Any advice how to solve this problem?
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
Caused by: javax.xml.transform.TransformerException: java.lang.UnsupportedOperationException

It seems your platform you deploy on has a different xml parser. What Java are you running on? Which platform are you running on?

mmaker1234
Champ in-the-making
Champ in-the-making
Hello Joram,

Activiti 5.12 engine is running in Oracle WebLogic 10.3.6 on Oracle (Sun) JVM 1.7.0.15.

I tried to provide the xercesImpl.jar in the EAR and even to "force" it at the beginning of the class path but with no success.

I also tried to provide the xercesImpl.jar in the beginning of the WebLogic start class path but this approach also failed with exactly the same error as in the original post, i.e. the
at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:118)
        at javax.xml.validation.Validator.validate(Validator.java:127)
        at org.activiti.bpmn.converter.BpmnXMLConverter.validateModel(BpmnXMLConverter.java:173)
always goes to com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl instead to redirect to the validator provided by xerces.

mmaker1234
Champ in-the-making
Champ in-the-making
To anyone interested in the problem,

1. More details on our Activiti environment: For distribution and deployment Activiti Engine is packed in a JAR file together with the needed libraries and the configuration file.

2. My solution to the problem in the original post: In the META-INF directory of the JAR file add a directory named services. In this directory place a file named javax.xml.stream.XMLInputFactory with the following contents:com.sun.xml.internal.stream.XMLInputFactoryImplFor more details see http://docs.oracle.com/javase/6/docs/api/javax/xml/stream/XMLInputFactory.html#newFactory%28%29

Cheers,
Monique

P.S. I found that the minimum of the external libraries to run Activiti 5.12 in WebLogic 10.3.6 is the following
In addition to the Activiti engine libraries
  • activiti-bpmn-converter-5.12.jar

  • activiti-bpmn-model-5.12.jar

  • activiti-engine-5.12.jar
we also need
  • commons-lang-2.4.jar

  • joda-time-2.1.jar

  • mybatis-3.1.1.jar

  • org.springframework.asm-3.1.2.RELEASE.jar

  • org.springframework.beans-3.1.2.RELEASE.jar

  • org.springframework.context-3.1.2.RELEASE.jar

  • org.springframework.core-3.1.2.RELEASE.jar

  • slf4j-api-1.7.2.jar
To output all log records to the console the following libraries are also needed
  • log4j-over-slf4j-1.7.2.jar

  • jcl-over-slf4j-1.7.2.jar

  • slf4j-jdk14-1.7.2.jar
Please note that we do not use for example Spring, e-mail, or web-services from within Activiti engine, therefore you might need to add other libraries to the list above to fulfill the needs of your application.

jbarrez
Star Contributor
Star Contributor
wow, thanks for finding that out! That is valuable information indeed. I wasn't aware that the META-INF could be used for that.

Awesome. Thanks for posting back!