Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
None
-
None
-
None
Description
On a pretty vanilla war file with a bit JAX-RS and arquillian, I get this error when trying to run an arquillian test (that worked before we upgraded the wildfly version):
[INFO] Running org.optaplanner.openshift.employeerostering.webapp.skill.SkillRestServiceTest Jan 31, 2018 7:52:20 PM org.jboss.as.arquillian.container.managed.ManagedDeployableContainer startInternal WARNING: Bundles path is deprecated and no longer used. Jan 31, 2018 7:52:20 PM org.jboss.as.arquillian.container.managed.ManagedDeployableContainer startInternal INFO: Starting container with: [/usr/lib/jvm/java-openjdk/bin/java, -D[Standalone], -Djboss.socket.binding.port-offset=10000, -Xms512m, -Xmx1024m, -XX:MaxPermSize=512m, -ea, -Djboss.home.dir=/home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final, -Dorg.jboss.boot.log.file=/home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final/standalone/log/server.log, -Dlogging.configuration=file:/home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final/standalone/configuration/logging.properties, -jar, /home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final/jboss-modules.jar, -mp, /home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final/modules, org.jboss.as.standalone, -Djboss.home.dir=/home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final, -Djboss.server.base.dir=/home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final/standalone, -Djboss.server.log.dir=/home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final/standalone/log, -Djboss.server.config.dir=/home/ge0ffrey/projects/jboss/optashift/optashift-employee-rostering/local/appserver/wildfly-10.1.0.Final/standalone/configuration] OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0 [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.449 s <<< FAILURE! - in org.optaplanner.openshift.employeerostering.webapp.skill.SkillRestServiceTest [ERROR] org.optaplanner.openshift.employeerostering.webapp.skill.SkillRestServiceTest Time elapsed: 0.448 s <<< ERROR! java.lang.NoClassDefFoundError: org/wildfly/security/permission/AbstractNameSetOnlyPermission at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) Caused by: java.lang.ClassNotFoundException: org.wildfly.security.permission.AbstractNameSetOnlyPermission at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
With this parent pom:
<properties>
<version.org.jboss.arquillian>1.2.1.Final</version.org.jboss.arquillian>
<version.org.wildfly.arquillian>2.1.0.Final</version.org.wildfly.arquillian>
<version.org.jboss.resteasy>3.1.4.Final</version.org.jboss.resteasy>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>${version.org.jboss.arquillian}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<version>${version.org.wildfly.arquillian}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>${version.org.jboss.resteasy}</version>
</dependency>
...
and this child pom:
<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-depchain</artifactId> <type>pom</type> <scope>test</scope> </dependency> <dependency> <groupId>org.wildfly.arquillian</groupId> <artifactId>wildfly-arquillian-container-managed</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-client</artifactId> <scope>test</scope> </dependency>
I am probably not using a correct version combination of arquillian and wildfly, but for mere mortals such as myself it takes days to find a working versions combination of arquillian and wildfly - everytime I need to upgrade wildfly. (The arquillian guides and arquillian-showcase-jaxrs are all hopelessly outdated in this aspect, they still mention jboss-as (= wildfly 7)).
Solution proposal A)
wildfly-arquillian-managed should automatically detect that it's a wrong version combination and give an error message like "I am not build to work with version x, but it seems like you're combining me with version y."
Solution proposal B)
Use the same version numbers for wildfly-arquillian-container-managed (currently 2.1.0.Final) as for wildfly.