Form failure: The context path is either empty or not defined. (TomCat)

Hello guys,

i cant start the process:

The HTML-Form is located in webapp/forms

In my BPMN-Modell is it configured like this:

>  <bpmn2:startEvent id="StartEvent_14324" name="Start" camunda:formKey="embedded:app:forms/eingeben-daten.html">
>       <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
>  </bpmn2:startEvent>

Thank you for help


UseWebServiceApplication

Summary

package de.hsb.webservice.usewebservice;

import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.application.impl.ServletProcessApplication;

@ProcessApplication(“UseWebService App”)
public class UseWebServiceApplication extends ServletProcessApplication {

}

pom.xml

Summary
 <project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.hsb.webservice</groupId>
	<artifactId>useWebService</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>

	<properties>
		<version.camunda>7.8.0</version.camunda>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.camunda.bpm</groupId>
				<artifactId>camunda-bom</artifactId>
				<version>${version.camunda}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.camunda.bpm</groupId>
			<artifactId>camunda-engine</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.camunda.connect</groupId>
			<artifactId>camunda-connect-core</artifactId>
		</dependency>

		<dependency>
			<groupId>org.camunda.connect</groupId>
			<artifactId>camunda-connect-soap-http-client</artifactId>
		</dependency>

		<dependency>
			<groupId>org.camunda.bpm</groupId>
			<artifactId>camunda-engine-plugin-connect</artifactId>
		</dependency>

		<dependency>
			<groupId>org.camunda.template-engines</groupId>
			<artifactId>camunda-template-engines-freemarker</artifactId>
		</dependency>

		<dependency>
			<groupId>org.camunda.spin</groupId>
			<artifactId>camunda-spin-core</artifactId>
		</dependency>

		<dependency>
			<groupId>org.camunda.spin</groupId>
			<artifactId>camunda-spin-dataformat-all</artifactId>
		</dependency>

		<dependency>
			<groupId>org.camunda.bpm</groupId>
			<artifactId>camunda-engine-plugin-spin</artifactId>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<failOnMissingWebXml>false</failOnMissingWebXml>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>

processes.xml

Summary
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xml>
<process-application
	xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<process-archive name="usewebservice">
		<process-engine>default</process-engine>
		<properties>
			<property name="isDeleteUponUndeploy">false</property>
			<property name="isScanForProcessDefinitions">true</property>
		</properties>
	</process-archive>
</process-application>

usewebserviceProcess.bpmn (5.5 KB)

Hi Gigli,
Could you please try this option :
If iam not wrong, the deployed form should be referenced as
embedded:deployment:eingeben-daten.html

Please refer the below for further info:

Thanks.

@rprasad19

I configured the start form like this

    <bpmn2:startEvent id="StartEvent_14324" name="Start" camunda:formKey="embedded:deployment:eingeben-daten.html">
      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
    </bpmn2:startEvent>

After this the ressource couldn’t found in the deployment.
I thought if you deploy the war in the tomcat directory, the first opportunity is the right one.

If i configure the form in the BPMN-Modeler like this

<bpmn2:extensionElements>
        <camunda:formData>
             <camunda:formField id="id" label="ID" type="long" />
         </camunda:formData>
</bpmn2:extensionElements>

the following error occurs, but in the catalina log the process application ‘UseWebService App’ is unavailable. catalina.2020-02-10.log (72.1 KB)

10-Feb-2020 18:54:48.068 SCHWERWIEGEND [Catalina-utility-2] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
10-Feb-2020 18:54:48.084 SCHWERWIEGEND [Catalina-utility-2] org.apache.catalina.core.StandardContext.startInternal Context [/useWebService-0.0.1-SNAPSHOT] startup failed due to previous errors
10-Feb-2020 18:56:20.103 SCHWERWIEGEND [http-nio-8080-exec-5] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: Cannot switch to process application 'UseWebService App' for execution: ENGINE-07011 Process Application 'UseWebService App' unavailable

If this error occurs, i can delete the folder which is generated by the war file.

After this the folder generates new and it works, but that isn’t a good solution for me.

Spin wasn’t configured correctly for the Camunda-TomCat 7.12.

It should look like this:

        <dependency>
			<groupId>org.camunda.spin</groupId>
			<artifactId>camunda-spin-core</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.camunda.spin</groupId>
			<artifactId>camunda-spin-dataformat-all</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.camunda.bpm</groupId>
			<artifactId>camunda-engine-plugin-spin</artifactId>
			<scope>provided</scope>
		</dependency>