[jboss-jira] [JBoss JIRA] (WFLY-9747) wildfly-arquillian-container-managed: java.lang.ClassNotFoundException: org.wildfly.security.permission.AbstractNameSetOnlyPermission
Geoffrey De Smet (JIRA)
issues at jboss.org
Wed Jan 31 14:20:00 EST 2018
[ https://issues.jboss.org/browse/WFLY-9747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13526866#comment-13526866 ]
Geoffrey De Smet commented on WFLY-9747:
----------------------------------------
org.wildfly.security.permission.AbstractNameSetOnlyPermission comes from wildfly-elytron.jar and if I compare a working project with older version with my non-working project, I notice that my newer project has the older wildfly-elytron jar:
{code}
// Working project with wildfly and arquillian
[INFO] | +- org.wildfly.arquillian:wildfly-arquillian-protocol-jmx:jar:2.0.0.Final:test
[INFO] | | +- org.wildfly.security:wildfly-elytron:jar:1.1.0.Final:test
{code}
{code}
// My project with wildfly and arquillian
[INFO] +- org.wildfly.arquillian:wildfly-arquillian-container-managed:jar:2.1.0.Final:test
...
[INFO] | +- org.wildfly.arquillian:wildfly-arquillian-protocol-jmx:jar:2.0.0.Final:test
[INFO] | | +- org.wildfly.security:wildfly-elytron:jar:1.0.2.Final:test
{code}
Manually hacking that to add wildfly-elytron 1.1.0.Final makes the error disappear.
Solution proposal C)
Have wildfly-arquillian-protocol-jmx depnd on wildfly-elytron 1.1.0.Final instead of 1.0.2.Final.
> wildfly-arquillian-container-managed: java.lang.ClassNotFoundException: org.wildfly.security.permission.AbstractNameSetOnlyPermission
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-9747
> URL: https://issues.jboss.org/browse/WFLY-9747
> Project: WildFly
> Issue Type: Bug
> Reporter: Geoffrey De Smet
> Assignee: Jason Greene
>
> 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):
> {code}
> [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)
> {code}
> With this parent pom:
> {code}
> <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>
> ...
> {code}
> and this child pom:
> {code}
> <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>
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list