Validation Error org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:271)


#1

Hi,
I have a Bpmn process and I have used a standalone Camunda Modeler v.3.1.0 to write my process.
I haven’t error in the Modeler and in Eclipse project.
I have validated the bpmn diagram with a simple java method:

            BpmnParser parser = new BpmnParser();
	        BpmnModelInstance modelinstance =  Bpmn.readModelFromStream(getClass().getClassLoader().getResourceAsStream("titolo_ii_istrutturia.bpmn"));
	        parser.validateModel(modelinstance.getDocument());

and Unit test

@Test
  @Deployment(resources = {"titolo_ii_istrutturia.bpmn"})
  public void shouldExecuteProcess() {
    // Given we create a new process instance
    ProcessInstance processInstance = runtimeService().startProcessInstanceByKey("istruttoria_id");
    // Then it should be active
    assertThat(processInstance).isActive();
    // And it should be the only instance
    assertThat(processInstanceQuery().count()).isEqualTo(1);
    // And there should exist just a single task within that process instance
    assertThat(task(processInstance)).isNotNull();

    // When we complete that task
    complete(task(processInstance),withVariables("approvatore", "approvatore"));
    
 
    // Then the process instance should be ended
    assertThat(processInstance).isEnded();
  }

But, when I try to deploy my process in camunda-tomcat-7.10 I’ll get the following stack-trace:

14-May-2019 16:50:32.292 INFORMAZIONI [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-08023 Deployment summary for process archive 'Process_Titolo2_Istruttoria': 

        titolo_ii_istrutturia.bpmn

14-May-2019 16:50:32.518 GRAVE [main] org.camunda.commons.logging.BaseLogger.logError ENGINE-01004 Unexpected Exception with message: null 
14-May-2019 16:50:32.519 GRAVE [main] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-09005 Could not parse BPMN process. Errors: 
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 212 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 230 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 269 | column 68
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 273 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 277 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 303 | column 68
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 372 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 392 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 434 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 500 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 517 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 666 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 671 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 720 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 730 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 767 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 842 | column 35
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 193 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 201 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 219 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 232 | column 80
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 236 | column 65
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 254 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 258 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 284 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 292 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 305 | column 85
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 313 | column 71
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 317 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 357 | column 65
* attribute 'messageRef' is required | titolo_ii_istrutturia.bpmn | line 619 | column 38
* Invalid 'messageRef': no message with id 'null' found. | titolo_ii_istrutturia.bpmn | line 619 | column 38
 org.camunda.bpm.engine.ProcessEngineException: ENGINE-09005 Could not parse BPMN process. Errors: 
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 212 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 230 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 269 | column 68
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 273 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 277 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 303 | column 68
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 372 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 392 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 434 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 500 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 517 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 666 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 671 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 720 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 730 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 767 | column 35
* cvc-complex-type.4: l'attributo 'name' deve apparire sull'elemento "bpmn:linkEventDefinition". | titolo_ii_istrutturia.bpmn | line 842 | column 35
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 193 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 201 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 219 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 232 | column 80
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 236 | column 65
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 254 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 258 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 284 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 292 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 305 | column 85
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 313 | column 71
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 317 | column 58
* One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | titolo_ii_istrutturia.bpmn | line 357 | column 65
* attribute 'messageRef' is required | titolo_ii_istrutturia.bpmn | line 619 | column 38
* Invalid 'messageRef': no message with id 'null' found. | titolo_ii_istrutturia.bpmn | line 619 | column 38
	at org.camunda.bpm.engine.impl.util.EngineUtilLogger.exceptionDuringParsing(EngineUtilLogger.java:61)
	at org.camunda.bpm.engine.impl.util.xml.Parse.throwExceptionForErrors(Parse.java:207)
	at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:271)
	at org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.transformDefinitions(BpmnDeployer.java:104)
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.transformResource(AbstractDefinitionDeployer.java:98)
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.parseDefinitionResources(AbstractDefinitionDeployer.java:73)
	at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.deploy(AbstractDefinitionDeployer.java:63)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.CacheDeployer$1.call(CacheDeployer.java:53)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.CacheDeployer$1.call(CacheDeployer.java:50)
	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:477)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.CacheDeployer.deploy(CacheDeployer.java:50)
	at org.camunda.bpm.engine.impl.persistence.deploy.cache.DeploymentCache.deploy(DeploymentCache.java:66)
	at org.camunda.bpm.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:64)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.deploy(DeployCmd.java:485)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:141)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:129)
	at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:477)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.doExecute(DeployCmd.java:129)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:95)
	at org.camunda.bpm.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:75)
	at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:27)
	at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:106)
	at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:69)
	at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
	at org.camunda.bpm.engine.impl.RepositoryServiceImpl.deployWithResult(RepositoryServiceImpl.java:101)
	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deployWithResult(DeploymentBuilderImpl.java:269)
	at org.camunda.bpm.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:265)
	at org.camunda.bpm.engine.impl.repository.ProcessApplicationDeploymentBuilderImpl.deploy(ProcessApplicationDeploymentBuilderImpl.java:62)
	at org.camunda.bpm.container.impl.deployment.DeployProcessArchiveStep.performOperationStep(DeployProcessArchiveStep.java:144)
	at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:119)
	at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:159)
	at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:215)
	at org.camunda.bpm.container.impl.RuntimeContainerDelegateImpl.deployProcessApplication(RuntimeContainerDelegateImpl.java:101)
	at org.camunda.bpm.application.AbstractProcessApplication.deploy(AbstractProcessApplication.java:62)
	at org.camunda.bpm.application.impl.ServletProcessApplication.contextInitialized(ServletProcessApplication.java:134)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4641)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5109)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1141)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1876)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1053)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:428)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1585)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:969)
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1429)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:944)
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:261)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)

How I can detect the right point where my bpmn diagram fails?
The " line 619 | column 38 " correspond a service task.

<bpmn:serviceTask id=“ServiceTask_0ykaplt” name=“Richiesta xx xxxxxxx” camunda:class=“xx.xx.xx.xxxx.xxx.LoggerDelegate”>
bpmn:incomingSequenceFlow_14rlta7</bpmn:incoming>
bpmn:outgoingSequenceFlow_0j0gjww</bpmn:outgoing>
</bpmn:serviceTask>

I don’t understand where is the error and where my diagram fails.
Thanks in advance for any suggestions or help.
Regards
Antonio


#2

Do you have a message task or event that is not configured?


#3

Hi Stephen,
at line 619 I have a service task with java implementation.
May I send you my bpmn file? But I can’t publish here my process.
Regards
Antonio


#4

Dont look at the specific “line”. Review your BPMN file and look for a message event or anything that is generate a “message”. From the error you have a un-configured message


#5

I have 2 pools.
In the first pool have a service task. From this task I send a message to the second pool.
This is a start event for the second pool.
The message is:
<bpmn:message id=“Message_0ex8hfl” name=“Message_RichiestaIntegrazione” />

The start event of second pool is

<bpmn:startEvent id=“StartEvent_0m22wyk”>
bpmn:outgoingSequenceFlow_0ny381c</bpmn:outgoing>
<bpmn:messageEventDefinition id=“MessageEventDefinition_1dvzz79” messageRef=“Message_0ex8hfl” />
</bpmn:startEvent>

what I m missing?

Thanks
Antonio


#6

Past your bpmn into a github GIST or pastebin and share the bpmn please


#7

https://pastebin.com/vY76uc5e


#8

Can you paste in a github gist. unable to open pastebin currently


#9

I have solved by using another open source bpmn modeler.


#10

Hi Antonio,
I am also getting same issue, How u solved this issue,Can you please explain me,
Thanks in advanced.


#11

Hi Ravi,
I have used imixs BPMN modeler (https://www.imixs.org/). It’s an eclipse based modeler and open source engine. Whit this modeler you can discover where your BPMN is not valid. In my case, I had a branch without the end element.
See :
<bpmn:intermediateCatchEvent id=“IntermediateCatchEvent_1hbria9” name=“controdeduzione non ricevuta”>