I’m trying to upgrade my camunda service from 7.10.0 to 7.12.0.
Spring Boot context failed to load on integration tests with this error:
[INFO] Running com.foo.orchestrator.common.listeners.StopSubscriptionWorkflowListenerTestsIT
____ _ ____ ____ __ __
/ ___| __ _ _ __ ___ _ _ _ __ __| | __ _ | __ )| _ \| \/ |
| | / _` | '_ ` _ \| | | | '_ \ / _` |/ _` | | _ \| |_) | |\/| |
| |__| (_| | | | | | | |_| | | | | (_| | (_| | | |_) | __/| | | |
\____/\__,_|_| |_| |_|\__,_|_| |_|\__,_|\__,_| |____/|_| |_| |_|
Spring-Boot: (v2.3.3.RELEASE)
Camunda BPM: (v7.12.0)
Camunda BPM Spring Boot Starter: (v3.4.4)
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.046 s <<< FAILURE! - in com.foo.orchestrator.common.listeners.StopSubscriptionWorkflowListenerTestsIT
[ERROR] testListenerOK Time elapsed: 0.001 s <<< ERROR!
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'camundaBpmRestInitializer' defined in class path resource [org/camunda/bpm/spring/boot/starter/rest/CamundaBpmRestJerseyAutoConfiguration.class]: Unsatisfied dependency expressed through method 'camundaBpmRestInitializer' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.autoconfigure.web.servlet.JerseyApplicationPath' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.autoconfigure.web.servlet.JerseyApplicationPath' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Test class is annotated with @SpringBootTest.
With Camunda 7.10.0, there is no error.
I tried to add spring.jersey.applicationPath to my application.yml but there is no effect.
Can anybody help me ?
Here is an extract of my pom.xml:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.3.RELEASE</version>
<relativePath />
</parent>
<properties>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<camunda-bpm.version>7.12.0</camunda-bpm.version>
<camunda-bpm-spring-boot.version>3.4.4</camunda-bpm-spring-boot.version>
<camunda-bpm-assert.version>5.0.0</camunda-bpm-assert.version>
<camunda-bpm-assert-scenario.version>1.0.0</camunda-bpm-assert-scenario.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Camunda BPM : https://docs.camunda.org/ -->
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>${camunda-bpm.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Camunda Spring Boot Integration -->
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>${camunda-bpm-spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>${camunda-bpm-spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>${camunda-bpm-spring-boot.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
<version>${camunda-bpm-spring-boot.version}</version>
<scope>test</scope>
</dependency>
<!-- Camunda BPM Assert -->
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<version>${camunda-bpm-assert.version}</version>
<scope>test</scope>
</dependency>
<!-- Camunda BPM Extensions -->
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-assert-scenario</artifactId>
<version>${camunda-bpm-assert-scenario.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-assert-scenario</artifactId>
<scope>test</scope>
</dependency>
</dependencies>