I’m using Community Edition v7.10 embedded the engine inside spring-boot-starter-jersey with camunda-bpm-spring-boot-starter, camunda-bpm-spring-boot-starter-rest, camunda-bpm-spring-boot-starter-webapp and would like to write integration tests at Test Scope 2:
Thus I packaged my app in the test jar as a WAR and shipped it over to the Wildfly container. I see the example invoice app deploying, then my test war is trying to deploy but keep failing with:
ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool – 108) MSC000001: Failed to start service jboss.deployment.unit.“trust-profile-integra
tion-test.war”.undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit.“trust-profile-integration-test.war”.undertow-deployment
: java.lang.RuntimeException: java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer cannot be cast to io.undertow.websockets.jsr.Serv
erWebSocketContainer
My test context setup for Arquillian is:
<profile> <id>wildfly-managed</id> <dependencies> <dependency> <!-- CDI integration, needs to be included in WAR, otherwise CDI can not work correctly --> <groupId>org.camunda.bpm</groupId> <artifactId>camunda-engine-cdi</artifactId> <scope>test</scope> </dependency> <dependency> <!-- Exclude Tomcat --> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <!-- Exclude Tomcat --> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-websocket</artifactId> <scope>provided</scope> </dependency> <!-- dependency> <groupId>org.camunda.commons</groupId> <artifactId>camunda-commons-typed-values</artifactId> <version>7.13.0-SNAPSHOT</version> <scope>test</scope> </dependency --> <!-- Needed for ArquillianTest --> <dependency> <groupId>org.wildfly.arquillian</groupId> <artifactId>wildfly-arquillian-container-managed</artifactId> <version>${wildfly.container.adapter.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.protocol</groupId> <artifactId>arquillian-protocol-servlet</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-impl-maven</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> </testResource> </testResources> <plugins> <!-- clean h2 database from camunda-bpm-wildfly --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version>2.6</version> <configuration> <filesets> <fileset> <directory>camunda-h2-dbs</directory> <includes> <include>**/*</include> </includes> <followSymlinks>false</followSymlinks> </fileset> </filesets> <failOnError>false</failOnError> </configuration> </plugin> <!-- unpack camunda bpm wildfly distro --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>unpack-server</id> <phase>generate-resources</phase> <goals> <goal>unpack</goal> </goals> <inherited>false</inherited> <configuration> <artifactItems> <artifactItem> <groupId>org.camunda.bpm.wildfly</groupId> <artifactId>camunda-bpm-wildfly</artifactId> <version>7.13.0-SNAPSHOT</version> <type>tar.gz</type> <overWrite>true</overWrite> <outputDirectory>${project.build.directory}/wildfly</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile>
Would someone please provide a hint?