[jboss-jira] [JBoss JIRA] (ELY-534) Some tests fail with ExceptionInInitializerError with JMockit 1.22 for IBM JDK

Ondrej Lukas (JIRA) issues at jboss.org
Mon May 16 08:40:00 EDT 2016


Ondrej Lukas created ELY-534:
--------------------------------

             Summary: Some tests fail with ExceptionInInitializerError with JMockit 1.22 for IBM JDK
                 Key: ELY-534
                 URL: https://issues.jboss.org/browse/ELY-534
             Project: WildFly Elytron
          Issue Type: Bug
    Affects Versions: 1.1.0.Beta6
            Reporter: Ondrej Lukas
            Assignee: Darran Lofthouse
            Priority: Minor


Some tests fail with java.lang.ExceptionInInitializerError on IBM JDK.

Stacktrace (for OAuth2SecurityRealmTest):
{code}
java.lang.ExceptionInInitializerError
	at java.lang.J9VMInternals.ensureError(J9VMInternals.java:137)
	at java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:126)
	at org.wildfly.security.auth.realm.oauth2.OAuth2SecurityRealmTest.configureTokenIntrospectionEndpoint(OAuth2SecurityRealmTest.java:198)
	at org.wildfly.security.auth.realm.oauth2.OAuth2SecurityRealmTest.configureReplayTokenIntrospection(OAuth2SecurityRealmTest.java:188)
	at org.wildfly.security.auth.realm.oauth2.OAuth2SecurityRealmTest.testBasicActiveToken(OAuth2SecurityRealmTest.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.lang.IllegalStateException: To run on IBM J9 VM, add <IBM SDK>/lib/tools.jar to the runtime classpath (before jmockit), or use -javaagent:/mnt/hudson_workspace/workspace/wildfly-elytron-unit-tests/5fe75d5a/maven-repository/org/jmockit/jmockit/1.22/jmockit-1.22.jar
	at mockit.internal.startup.AgentLoader.loadAgent(AgentLoader.java:49)
	at mockit.internal.startup.Startup.verifyInitialization(Startup.java:172)
	at mockit.MockUp.<clinit>(MockUp.java:94)
	... 27 more
{code}

This is probably only test issue.

Affected tests:
org.wildfly.security.auth.realm.oauth2.OAuth2SecurityRealmTest
org.wildfly.security.sasl.digest.CompatibilityClientTest 
org.wildfly.security.sasl.digest.CompatibilityServerTest
org.wildfly.security.sasl.entity.EntityTest 
org.wildfly.security.sasl.gssapi.compatibility.BasicAuthTest 
org.wildfly.security.sasl.gssapi.compatibility.BasicConfidenceTest
org.wildfly.security.sasl.gssapi.compatibility.BasicIntegrityTest
org.wildfly.security.sasl.gssapi.compatibility.NoServerAuthTest
org.wildfly.security.sasl.otp.OTPTest
org.wildfly.security.sasl.scram.ScramClientCompatibilityTest
org.wildfly.security.sasl.scram.ScramServerCompatibilityTest

It seems that this issue can be fixed by adding -{{javaagent:$\{USED_MAVEN_REPO\}/org/jmockit/jmockit/1.22/jmockit-1.22.jar}} as argLine option for Maven Surefire Plugin.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list