Eclipse 2019-03 EclEmma plugin is causing UnsupportedOperationException

41 views
Skip to first unread message

jahunsmythe

unread,
Jun 21, 2019, 11:12:40 AM6/21/19
to JaCoCo and EclEmma Users
This error does not occur with command line builds of my project.

But in Eclipse, when running the JUnit tests, this error occurs.
I am assuming that this is occurring is the version of JaCoCo that EclEmma is using has a dependency on an older version of ASM that has not fixed the problem with NestHost and NestMembers.
Just an FYI:  I am using EclEmma/JaCoCo combined with JMockit.  This shouldn't be the cause, as this is a known problem with ASM.
See the JMockit issue for more information about this:


My environment:

Windows 10
Eclipse 2019-03
Java 11.0.1
JUnit 5
JMockit 1.46
ASM 7.1

The Exception from a JUnit test in Eclipse that is failing:

java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the class NestHost or NestMembers attribute
at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:193)
at mockit.internal.startup.Startup.redefineMethods(Startup.java:159)
at mockit.internal.state.MockFixture.redefineClasses(MockFixture.java:159)
at mockit.internal.expectations.mocking.BaseTypeRedefinition.applyClassRedefinition(BaseTypeRedefinition.java:221)
at mockit.internal.expectations.mocking.BaseTypeRedefinition.redefineClass(BaseTypeRedefinition.java:215)
at mockit.internal.expectations.mocking.BaseTypeRedefinition.redefineClassAndItsSuperClasses(BaseTypeRedefinition.java:188)
at mockit.internal.expectations.mocking.BaseTypeRedefinition.redefineClassAndItsSuperClasses(BaseTypeRedefinition.java:204)
at mockit.internal.expectations.mocking.BaseTypeRedefinition.redefineMethodsAndConstructorsInTargetType(BaseTypeRedefinition.java:175)
at mockit.internal.expectations.mocking.BaseTypeRedefinition.redefineTargetClassAndCreateInstanceFactory(BaseTypeRedefinition.java:251)
at mockit.internal.expectations.mocking.BaseTypeRedefinition.redefineType(BaseTypeRedefinition.java:67)
at mockit.internal.expectations.mocking.TypeRedefinition.redefineType(TypeRedefinition.java:28)
at mockit.internal.expectations.mocking.FieldTypeRedefinitions.redefineFieldType(FieldTypeRedefinitions.java:78)
at mockit.internal.expectations.mocking.FieldTypeRedefinitions.redefineFieldType(FieldTypeRedefinitions.java:65)
at mockit.internal.expectations.mocking.FieldTypeRedefinitions.redefineFieldTypes(FieldTypeRedefinitions.java:53)
at mockit.internal.expectations.mocking.FieldTypeRedefinitions.<init>(FieldTypeRedefinitions.java:33)
at mockit.integration.internal.TestRunnerDecorator.handleMockFieldsForWholeTestClass(TestRunnerDecorator.java:141)
at mockit.integration.junit5.JMockitExtension.postProcessTestInstance(JMockitExtension.java:52)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$invokeTestInstancePostProcessors$3(ClassTestDescriptor.java:215)
at org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.executeAndMaskThrowable(JupiterTestDescriptor.java:141)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$invokeTestInstancePostProcessors$4(ClassTestDescriptor.java:215)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.invokeTestInstancePostProcessors(ClassTestDescriptor.java:214)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateAndPostProcessTestInstance(ClassTestDescriptor.java:196)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$testInstanceProvider$0(ClassTestDescriptor.java:185)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$testInstanceProvider$1(ClassTestDescriptor.java:189)
at java.base/java.util.Optional.orElseGet(Optional.java:369)
at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.lambda$testInstanceProvider$2(ClassTestDescriptor.java:188)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:81)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:58)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.prepare(HierarchicalTestExecutor.java:89)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:74)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:121)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:121)
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:121)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:121)
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:55)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137)
at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)

Marc Hoffmann

unread,
Jun 21, 2019, 11:20:57 AM6/21/19
to jac...@googlegroups.com
Does this error also occur when you run your tests in Eclipse in normal “run” mode (no coverage)?

In this case JaCoCo or EclEmma is not involved in your runtime classpath at all. And even when you run your application with with JaCoCo the JaCoCo agent includes its own repackaged version of ASM which will not interfere with other ASM versions on the class path.

Regards,
-marc


--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/24302a95-cbc1-4b6e-bbac-884b2d9ba510%40googlegroups.com.

JD Smith

unread,
Jun 21, 2019, 11:48:45 AM6/21/19
to jac...@googlegroups.com

Marc,

 

Thanks for the response.

You are right – it occurs with the normal Run mode…

So this would be an Eclipse problem with the Junit runner, probably.

 

I love the EclEmma/JaCoCo code coverage tools.  I use them all the time, and have for many  years.

 

I’ll contact Eclipse now.

 

Thanks again,

JD

Marc Hoffmann

unread,
Jun 21, 2019, 11:53:39 AM6/21/19
to jac...@googlegroups.com
Not sure what role Eclipse IDE plays here.

Please compare the classpath used when run on command vs when launched from Eclipse (select properties on the process object in the Debug view and you will see the full command line created by Eclipse). I assume some subtil differences like different JAR versions or ordering.

Thanks for the feedback ;)

Regards,
-marc

JD Smith

unread,
Jun 21, 2019, 12:13:11 PM6/21/19
to jac...@googlegroups.com

Marc,

 

A separate issue I have seen when I tried to upgrade to the latest version of JaCoCo 0.8.4.

I get ArrayIndexOutOfBoundsExceptions with 0.8.4 version, on command line builds.

I am running JaCoCo in combination with JMockit 1.46.

This does not occur with version 0.8.3.

 

From command line build:

 

[INFO] -------------------------------------------------------

[INFO]  T E S T S

[INFO] -------------------------------------------------------

[INFO] Running com.sos.saloons.service.rest.GlobalPropertiesTest

[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.872 s - in com.sos.saloons.service.rest.GlobalPropertiesTest

[INFO] Running com.sos.saloons.service.rest.resources.AboutResourceTest

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.797 s <<< FAILURE! - in com.sos.saloons.service.rest.resources.AboutResourceTest

[ERROR] getAboutTest  Time elapsed: 0.017 s  <<< ERROR!

java.lang.ArrayIndexOutOfBoundsException: Index 18729 out of bounds for length 159

 

[INFO] Running com.sos.saloons.service.rest.resources.ContactUsResourceTest

[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.899 s <<< FAILURE! - in com.sos.saloons.service.rest.resources.ContactUsResourceTest

[ERROR] submitContactUsTest  Time elapsed: 0.014 s  <<< ERROR!

java.lang.ArrayIndexOutOfBoundsException: Index 10767 out of bounds for length 6722

 

[ERROR] submitContactUsExceptionTest  Time elapsed: 0.001 s  <<< ERROR!

java.lang.ArrayIndexOutOfBoundsException: Index 10767 out of bounds for length 6722

 

[ERROR] submitContactUsValidatorErrorsTest  Time elapsed: 0 s  <<< ERROR!

java.lang.ArrayIndexOutOfBoundsException

 

[INFO] Running com.sos.saloons.service.rest.resources.CrashReportResourceTest

[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.223 s <<< FAILURE! - in com.sos.saloons.service.rest.resources.CrashReportResourceTest

[ERROR] submitCrashReportTest  Time elapsed: 0.019 s  <<< ERROR!

java.lang.ArrayIndexOutOfBoundsException: Index 41100 out of bounds for length 17578

 

[ERROR] submitCrashReportValidationErrorTest  Time elapsed: 0 s  <<< ERROR!

java.lang.ArrayIndexOutOfBoundsException: Index 41100 out of bounds for length 17578

 

[ERROR] submitContactUsExceptionTest  Time elapsed: 0.001 s  <<< ERROR!

java.lang.ArrayIndexOutOfBoundsException: Index 41100 out of bounds for length 17578

 

If you would like me to post an issue about the JaCoCo 0.8.4 ArrayIndexOutOfBoundsException, let me know.

 

Thanks again,

JD

 

From: jac...@googlegroups.com <jac...@googlegroups.com> On Behalf Of Marc Hoffmann
Sent: Friday, June 21, 2019 9:21 AM
To: jac...@googlegroups.com
Subject: Re: [java code coverage] Eclipse 2019-03 EclEmma plugin is causing UnsupportedOperationException

 

Does this error also occur when you run your tests in Eclipse in normal “run” mode (no coverage)?

Marc Hoffmann

unread,
Jun 21, 2019, 12:16:21 PM6/21/19
to JaCoCo and EclEmma Users
Can you please send the full stack trace of the exception?

Thx,
-marc
 

Evgeny Mandrikov

unread,
Jun 21, 2019, 12:27:38 PM6/21/19
to JaCoCo and EclEmma Users
In addition to what was said by Marc:

Eclipse 2019-03 ships with
EclEmma 3.1.2
which uses JaCoCo 0.8.3
which in his turn includes and uses official ASM 7.0

that has nothing to do with ASM embedded/forked/rewritten in JMockit.

Support of Java 11 JEP 181 (NestHost/NestMembers) was implemented in official ASM 7.0 and to our knowledge no changes in this support was done since then.

IMO this could easily be an issue in JMockit, and BTW you use not the latest one, which is 1.47.


On Friday, June 21, 2019 at 5:20:57 PM UTC+2, Marc R. Hoffmann wrote:
Does this error also occur when you run your tests in Eclipse in normal “run” mode (no coverage)?

In this case JaCoCo or EclEmma is not involved in your runtime classpath at all. And even when you run your application with with JaCoCo the JaCoCo agent includes its own repackaged version of ASM which will not interfere with other ASM versions on the class path.

Regards,
-marc

To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.

Evgeny Mandrikov

unread,
Jun 21, 2019, 12:38:14 PM6/21/19
to JaCoCo and EclEmma Users


On Friday, June 21, 2019 at 6:13:11 PM UTC+2, jahunsmythe wrote:

Marc,

   

A separate issue I have seen when I tried to upgrade to the latest version of JaCoCo 0.8.4.


For future please consider creation of a separate discussion thread in such case instead of mixing multiple topics in one.
 

I get ArrayIndexOutOfBoundsExceptions with 0.8.4 version, on command line builds.

I am running JaCoCo in combination with JMockit 1.46.

This does not occur with version 0.8.3.


This one is very likely relates to the following bug in JMockit - https://github.com/jmockit/jmockit1/issues/615#issuecomment-501009439


Regards,
Evgeny

Evgeny Mandrikov

unread,
Jun 21, 2019, 3:34:00 PM6/21/19
to JaCoCo and EclEmma Users


On Friday, June 21, 2019 at 5:53:39 PM UTC+2, Marc R. Hoffmann wrote:
Not sure what role Eclipse IDE plays here.

Please compare the classpath used when run on command vs when launched from Eclipse (select properties on the process object in the Debug view and you will see the full command line created by Eclipse). I assume some subtil differences like different JAR versions or ordering.

And here is another hint:

Your stacktrace claims that method "redefineMethods" of mockit/internal/startup/Startup.java is at line 159 :

java.lang.UnsupportedOperationException: class redefinition failed: attempted to change the class NestHost or NestMembers attribute
                at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
                at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:193)
                at mockit.internal.startup.Startup.redefineMethods(Startup.java:159)

which is not the case for sources of JMockit 1.46 - http://repo1.maven.org/maven2/org/jmockit/jmockit/1.46/jmockit-1.46-sources.jar

the latest version where this was the case is 1.41 - http://repo1.maven.org/maven2/org/jmockit/jmockit/1.41/jmockit-1.41-sources.jar


JD Smith

unread,
Jun 23, 2019, 6:13:02 PM6/23/19
to jac...@googlegroups.com

Marc,

 

I ran mvn clean install -X, but there isn’t any additional stack trace info available.

But a little more information from -X, which is probably useless for analysis:

 

[DEBUG] Determined Maven Process ID 66056

[DEBUG] boot classpath:  C:\Users\John\.m2\repository\org\apache\maven\surefire\surefire-booter\3.0.0-M3\surefire-booter-3.0.0-M3.jar  C:\Users\John\.m2\repository\org\apache\maven\surefire\surefire-api\3.0.0-M3\surefire-api-3.0.0-M3.jar  C:\Users\John\.m2\repository\org\apache\maven\surefire\surefire-logger-api\3.0.0-M3\surefire-logger-api-3.0.0-M3.jar  C:\SOSDevelopmentGit\restwebservice\target\test-classes  C:\SOSDevelopmentGit\restwebservice\target\classes  C:\Users\John\.m2\repository\com\sos\saloons\xmlschema\1.20.0-SNAPSHOT\xmlschema-1.20.0-SNAPSHOT.jar  C:\Users\John\.m2\repository\com\sos\saloons\db-hibernate\1.23.0-SNAPSHOT\db-hibernate-1.23.0-SNAPSHOT.jar  C:\Users\John\.m2\repository\org\hibernate\hibernate-core\5.1.16.Final\hibernate-core-5.1.16.Final.jar  C:\Users\John\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar  C:\Users\John\.m2\repository\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar  C:\Users\John\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar  C:\Users\John\.m2\repository\org\apache\geronimo\specs\geronimo-jta_1.1_spec\1.1.1\geronimo-jta_1.1_spec-1.1.1.jar  C:\Users\John\.m2\repository\org\jboss\jandex\2.0.3.Final\jandex-2.0.3.Final.jar  C:\Users\John\.m2\repository\com\fasterxml\classmate\1.3.0\classmate-1.3.0.jar  C:\Users\John\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar  C:\Users\John\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar  C:\Users\John\.m2\repository\org\hibernate\hibernate-c3p0\5.1.16.Final\hibernate-c3p0-5.1.16.Final.jar  C:\Users\John\.m2\repository\com\mchange\c3p0\0.9.2.1\c3p0-0.9.2.1.jar  C:\Users\John\.m2\repository\com\mchange\mchange-commons-java\0.2.3.4\mchange-commons-java-0.2.3.4.jar  C:\Users\John\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar  C:\Users\John\.m2\repository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar  C:\Users\John\.m2\repository\com\sos\saloons\saloons-common\1.24.0-SNAPSHOT\saloons-common-1.24.0-SNAPSHOT.jar  C:\Users\John\.m2\repository\org\openjfx\javafx-graphics\12.0.1\javafx-graphics-12.0.1.jar  C:\Users\John\.m2\repository\org\openjfx\javafx-graphics\12.0.1\javafx-graphics-12.0.1-win.jar  C:\Users\John\.m2\repository\org\openjfx\javafx-swing\12.0.1\javafx-swing-12.0.1.jar  C:\Users\John\.m2\repository\org\openjfx\javafx-swing\12.0.1\javafx-swing-12.0.1-win.jar  C:\Users\John\.m2\repository\com\drewnoakes\metadata-extractor\2.9.1\metadata-extractor-2.9.1.jar  C:\Users\John\.m2\repository\com\adobe\xmp\xmpcore\5.1.2\xmpcore-5.1.2.jar  C:\Users\John\.m2\repository\com\sun\mail\javax.mail\1.5.5\javax.mail-1.5.5.jar  C:\Users\John\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar  C:\Users\John\.m2\repository\com\sun\mail\smtp\1.5.5\smtp-1.5.5.jar  C:\Users\John\.m2\repository\org\openjfx\javafx-base\12.0.1\javafx-base-12.0.1.jar  C:\Users\John\.m2\repository\org\openjfx\javafx-base\12.0.1\javafx-base-12.0.1-win.jar  C:\Users\John\.m2\repository\org\hibernate\hibernate-hikaricp\5.1.16.Final\hibernate-hikaricp-5.1.16.Final.jar  C:\Users\John\.m2\repository\org\jboss\logging\jboss-logging\3.3.0.Final\jboss-logging-3.3.0.Final.jar  C:\Users\John\.m2\repository\com\zaxxer\HikariCP-java6\2.3.9\HikariCP-java6-2.3.9.jar  C:\Users\John\.m2\repository\org\slf4j\slf4j-api\1.8.0-alpha2\slf4j-api-1.8.0-alpha2.jar  C:\Users\John\.m2\repository\org\apache\logging\log4j\log4j-slf4j18-impl\2.11.1\log4j-slf4j18-impl-2.11.1.jar  C:\Users\John\.m2\repository\org\apache\logging\log4j\log4j-api\2.11.1\log4j-api-2.11.1.jar  C:\Users\John\.m2\repository\org\apache\logging\log4j\log4j-core\2.11.1\log4j-core-2.11.1.jar  C:\Users\John\.m2\repository\org\apache\commons\commons-lang3\3.5\commons-lang3-3.5.jar  C:\Users\John\.m2\repository\commons-io\commons-io\2.5\commons-io-2.5.jar  C:\Users\John\.m2\repository\org\apache\commons\commons-collections4\4.1\commons-collections4-4.1.jar  C:\Users\John\.m2\repository\org\springframework\spring-context\4.3.1.RELEASE\spring-context-4.3.1.RELEASE.jar  C:\Users\John\.m2\repository\org\springframework\spring-aop\4.3.1.RELEASE\spring-aop-4.3.1.RELEASE.jar  C:\Users\John\.m2\repository\org\springframework\spring-beans\4.3.1.RELEASE\spring-beans-4.3.1.RELEASE.jar  C:\Users\John\.m2\repository\org\springframework\spring-core\4.3.1.RELEASE\spring-core-4.3.1.RELEASE.jar  C:\Users\John\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar  C:\Users\John\.m2\repository\org\springframework\spring-expression\4.3.1.RELEASE\spring-expression-4.3.1.RELEASE.jar  C:\Users\John\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.3\commons-beanutils-core-1.8.3.jar  C:\Users\John\.m2\repository\javax\ws\rs\javax.ws.rs-api\2.1\javax.ws.rs-api-2.1.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\core\jersey-server\2.27\jersey-server-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\core\jersey-client\2.27\jersey-client-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\hk2\external\javax.inject\2.5.0-b42\javax.inject-2.5.0-b42.jar  C:\Users\John\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\core\jersey-common\2.27\jersey-common-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\hk2\osgi-resource-locator\1.0.1\osgi-resource-locator-1.0.1.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\inject\jersey-hk2\2.27\jersey-hk2-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\hk2\hk2-locator\2.5.0-b42\hk2-locator-2.5.0-b42.jar  C:\Users\John\.m2\repository\org\glassfish\hk2\external\aopalliance-repackaged\2.5.0-b42\aopalliance-repackaged-2.5.0-b42.jar  C:\Users\John\.m2\repository\org\glassfish\hk2\hk2-api\2.5.0-b42\hk2-api-2.5.0-b42.jar  C:\Users\John\.m2\repository\javax\inject\javax.inject\1\javax.inject-1.jar  C:\Users\John\.m2\repository\org\glassfish\hk2\hk2-utils\2.5.0-b42\hk2-utils-2.5.0-b42.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet\2.27\jersey-container-servlet-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet-core\2.27\jersey-container-servlet-core-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\containers\jersey-container-grizzly2-http\2.27\jersey-container-grizzly2-http-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\grizzly\grizzly-http-server\2.4.0\grizzly-http-server-2.4.0.jar  C:\Users\John\.m2\repository\org\glassfish\grizzly\grizzly-http\2.4.0\grizzly-http-2.4.0.jar  C:\Users\John\.m2\repository\org\glassfish\grizzly\grizzly-framework\2.4.0\grizzly-framework-2.4.0.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\containers\jersey-container-grizzly2-servlet\2.27\jersey-container-grizzly2-servlet-2.27.jar  C:\Users\John\.m2\repository\javax\servlet\javax.servlet-api\4.0.0\javax.servlet-api-4.0.0.jar  C:\Users\John\.m2\repository\org\glassfish\grizzly\grizzly-http-servlet\2.4.0\grizzly-http-servlet-2.4.0.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\media\jersey-media-jaxb\2.27\jersey-media-jaxb-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\media\jersey-media-moxy\2.27\jersey-media-moxy-2.27.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\ext\jersey-entity-filtering\2.27\jersey-entity-filtering-2.27.jar  C:\Users\John\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.moxy\2.7.2\org.eclipse.persistence.moxy-2.7.2.jar  C:\Users\John\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.core\2.7.2\org.eclipse.persistence.core-2.7.2.jar  C:\Users\John\.m2\repository\org\eclipse\persistence\org.eclipse.persistence.asm\2.7.2\org.eclipse.persistence.asm-2.7.2.jar  C:\Users\John\.m2\repository\org\glassfish\javax.json\1.0.4\javax.json-1.0.4.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\media\jersey-media-json-jackson\2.27\jersey-media-json-jackson-2.27.jar  C:\Users\John\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.10\jackson-databind-2.8.10.jar  C:\Users\John\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.8.10\jackson-core-2.8.10.jar  C:\Users\John\.m2\repository\com\fasterxml\jackson\module\jackson-module-jaxb-annotations\2.8.10\jackson-module-jaxb-annotations-2.8.10.jar  C:\Users\John\.m2\repository\org\glassfish\jersey\media\jersey-media-multipart\2.27\jersey-media-multipart-2.27.jar  C:\Users\John\.m2\repository\org\jvnet\mimepull\mimepull\1.9.6\mimepull-1.9.6.jar  C:\Users\John\.m2\repository\javax\xml\bind\jaxb-api\2.3.0\jaxb-api-2.3.0.jar  C:\Users\John\.m2\repository\com\sun\xml\bind\jaxb-core\2.3.0\jaxb-core-2.3.0.jar  C:\Users\John\.m2\repository\com\sun\xml\bind\jaxb-impl\2.3.0\jaxb-impl-2.3.0.jar  C:\Users\John\.m2\repository\com\restfb\restfb\2.10.0\restfb-2.10.0.jar  C:\Users\John\.m2\repository\com\google\api-client\google-api-client\1.22.0\google-api-client-1.22.0.jar  C:\Users\John\.m2\repository\com\google\oauth-client\google-oauth-client\1.22.0\google-oauth-client-1.22.0.jar  C:\Users\John\.m2\repository\com\google\http-client\google-http-client\1.22.0\google-http-client-1.22.0.jar  C:\Users\John\.m2\repository\org\apache\httpcomponents\httpclient\4.0.1\httpclient-4.0.1.jar  C:\Users\John\.m2\repository\org\apache\httpcomponents\httpcore\4.0.1\httpcore-4.0.1.jar  C:\Users\John\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar  C:\Users\John\.m2\repository\com\google\http-client\google-http-client-jackson2\1.22.0\google-http-client-jackson2-1.22.0.jar  C:\Users\John\.m2\repository\com\google\guava\guava-jdk5\17.0\guava-jdk5-17.0.jar  C:\Users\John\.m2\repository\org\jmockit\jmockit\1.46\jmockit-1.46.jar  C:\Users\John\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar  C:\Users\John\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.2.0\junit-jupiter-engine-5.2.0.jar  C:\Users\John\.m2\repository\org\apiguardian\apiguardian-api\1.0.0\apiguardian-api-1.0.0.jar  C:\Users\John\.m2\repository\org\junit\platform\junit-platform-engine\1.2.0\junit-platform-engine-1.2.0.jar  C:\Users\John\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.2.0\junit-jupiter-api-5.2.0.jar  C:\Users\John\.m2\repository\org\opentest4j\opentest4j\1.1.0\opentest4j-1.1.0.jar  C:\Users\John\.m2\repository\org\junit\platform\junit-platform-commons\1.2.0\junit-platform-commons-1.2.0.jar  C:\Users\John\.m2\repository\org\apache\maven\surefire\surefire-logger-api\2.21.0\surefire-logger-api-2.21.0.jar  C:\Users\John\.m2\repository\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar  C:\Users\John\.m2\repository\org\apache\maven\surefire\surefire-api\2.21.0\surefire-api-2.21.0.jar  C:\Users\John\.m2\repository\org\apache\maven\surefire\common-java5\2.21.0\common-java5-2.21.0.jar  C:\Users\John\.m2\repository\org\junit\platform\junit-platform-surefire-provider\1.2.0\junit-platform-surefire-provider-1.2.0.jar  C:\Users\John\.m2\repository\org\junit\platform\junit-platform-launcher\1.3.1\junit-platform-launcher-1.3.1.jar  C:\Users\John\.m2\repository\org\ow2\asm\asm\7.1\asm-7.1.jar

[DEBUG] boot(compact) classpath:  surefire-booter-3.0.0-M3.jar  surefire-api-3.0.0-M3.jar  surefire-logger-api-3.0.0-M3.jar  test-classes  classes  xmlschema-1.20.0-SNAPSHOT.jar  db-hibernate-1.23.0-SNAPSHOT.jar  hibernate-core-5.1.16.Final.jar  hibernate-jpa-2.1-api-1.0.0.Final.jar  javassist-3.20.0-GA.jar  antlr-2.7.7.jar  geronimo-jta_1.1_spec-1.1.1.jar  jandex-2.0.3.Final.jar  classmate-1.3.0.jar  dom4j-1.6.1.jar  xml-apis-1.0.b2.jar  hibernate-c3p0-5.1.16.Final.jar  c3p0-0.9.2.1.jar  mchange-commons-java-0.2.3.4.jar  hibernate-commons-annotations-5.0.1.Final.jar  mysql-connector-java-5.1.38.jar  saloons-common-1.24.0-SNAPSHOT.jar  javafx-graphics-12.0.1.jar  javafx-graphics-12.0.1-win.jar  javafx-swing-12.0.1.jar  javafx-swing-12.0.1-win.jar  metadata-extractor-2.9.1.jar  xmpcore-5.1.2.jar  javax.mail-1.5.5.jar  activation-1.1.jar  smtp-1.5.5.jar  javafx-base-12.0.1.jar  javafx-base-12.0.1-win.jar  hibernate-hikaricp-5.1.16.Final.jar  jboss-logging-3.3.0.Final.jar  HikariCP-java6-2.3.9.jar  slf4j-api-1.8.0-alpha2.jar  log4j-slf4j18-impl-2.11.1.jar  log4j-api-2.11.1.jar  log4j-core-2.11.1.jar  commons-lang3-3.5.jar  commons-io-2.5.jar  commons-collections4-4.1.jar  spring-context-4.3.1.RELEASE.jar  spring-aop-4.3.1.RELEASE.jar  spring-beans-4.3.1.RELEASE.jar  spring-core-4.3.1.RELEASE.jar  commons-logging-1.2.jar  spring-expression-4.3.1.RELEASE.jar  commons-beanutils-core-1.8.3.jar  javax.ws.rs-api-2.1.jar  jersey-server-2.27.jar  jersey-client-2.27.jar  javax.inject-2.5.0-b42.jar  validation-api-1.1.0.Final.jar  jersey-common-2.27.jar  osgi-resource-locator-1.0.1.jar  jersey-hk2-2.27.jar  hk2-locator-2.5.0-b42.jar  aopalliance-repackaged-2.5.0-b42.jar  hk2-api-2.5.0-b42.jar  javax.inject-1.jar  hk2-utils-2.5.0-b42.jar  jersey-container-servlet-2.27.jar  jersey-container-servlet-core-2.27.jar  jersey-container-grizzly2-http-2.27.jar  grizzly-http-server-2.4.0.jar  grizzly-http-2.4.0.jar  grizzly-framework-2.4.0.jar  jersey-container-grizzly2-servlet-2.27.jar  javax.servlet-api-4.0.0.jar  grizzly-http-servlet-2.4.0.jar  jersey-media-jaxb-2.27.jar  jersey-media-moxy-2.27.jar  jersey-entity-filtering-2.27.jar  org.eclipse.persistence.moxy-2.7.2.jar  org.eclipse.persistence.core-2.7.2.jar  org.eclipse.persistence.asm-2.7.2.jar  javax.json-1.0.4.jar  jersey-media-json-jackson-2.27.jar  jackson-databind-2.8.10.jar  jackson-core-2.8.10.jar  jackson-module-jaxb-annotations-2.8.10.jar  jersey-media-multipart-2.27.jar  mimepull-1.9.6.jar  jaxb-api-2.3.0.jar  jaxb-core-2.3.0.jar  jaxb-impl-2.3.0.jar  restfb-2.10.0.jar  google-api-client-1.22.0.jar  google-oauth-client-1.22.0.jar  google-http-client-1.22.0.jar  httpclient-4.0.1.jar  httpcore-4.0.1.jar  commons-codec-1.3.jar  google-http-client-jackson2-1.22.0.jar  guava-jdk5-17.0.jar  jmockit-1.46.jar  jsr305-3.0.2.jar  junit-jupiter-engine-5.2.0.jar  apiguardian-api-1.0.0.jar  junit-platform-engine-1.2.0.jar  junit-jupiter-api-5.2.0.jar  opentest4j-1.1.0.jar  junit-platform-commons-1.2.0.jar  surefire-logger-api-2.21.0.jar  javax.annotation-api-1.2.jar  surefire-api-2.21.0.jar  common-java5-2.21.0.jar  junit-platform-surefire-provider-1.2.0.jar  junit-platform-launcher-1.3.1.jar  asm-7.1.jar

[DEBUG] Forking command line: cmd.exe /X /C "C:\SmithOptimalSolutions\tools\java\jdk-11.0.1\bin\java -javaagent:C:\Users\John\.m2\repository/org/jmockit/jmockit/1.46/jmockit-1.46.jar -javaagent:C:\Users\John\.m2\repository/org/jacoco/org.jacoco.agent/0.8.4/org.jacoco.agent-0.8.4-runtime.jar=destfile=target/jacoco.exec -jar C:\Users\John\AppData\Local\Temp\surefire601947270429409764\surefirebooter17843377533820913165.jar C:\Users\John\AppData\Local\Temp\surefire601947270429409764 2019-06-23T16-06-20_271-jvmRun1 surefire11281765326892054096tmp surefire_117997587047849790947tmp"

[INFO] Running com.sos.saloons.service.rest.resources.AboutResourceTest

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.719 s <<< FAILURE! - in com.sos.saloons.service.rest.resources.AboutResourceTest

[ERROR] getAboutTest  Time elapsed: 0.016 s  <<< ERROR!

java.lang.ArrayIndexOutOfBoundsException: Index 18729 out of bounds for length 159

 

 

JD

JD Smith

unread,
Jun 23, 2019, 6:48:12 PM6/23/19
to jac...@googlegroups.com

Evgeny,

 

Thanks for the response.

 

JMockit 1.47 isn’t released yet, according to the JMockit website.  That is why I upgraded to 1.46 rather than 1.47.  And 1.47 isn’t available on Maven Central yet.

 

I looked at the classpath of the project in Eclipse, which is generated from the Maven pom.xml, and it has JMockit 1.46.  In the pom.xml, for the maven-surefire-plugin, I have explicitly specified the ASM 7.1 as a dependency.   I even explicitly added ASM 7.1 to be a test dependency in the pom.xml (outside of maven-surefire-plugin), and that didn’t fix it either.

 

Since this builds correctly on the command line, and does not in Eclipse 2019-03, and the dependencies are correct in Eclipse for the project, this has to be an Eclipse problem.  There is something internal to Eclipse that is pulling in an older version of ASM that doesn’t have the NestHost/NestMembers problem fix, as you pointed out in the stack trace.

 

Thanks,

JD

 

From: jac...@googlegroups.com <jac...@googlegroups.com> On Behalf Of Evgeny Mandrikov
Sent: Friday, June 21, 2019 10:28 AM
To: JaCoCo and EclEmma Users <jac...@googlegroups.com>
Subject: Re: [java code coverage] Eclipse 2019-03 EclEmma plugin is causing UnsupportedOperationException

 

In addition to what was said by Marc:

To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.

 

--

You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/8c3098dd-c07e-4bf0-a108-2a7c5f398d5c%40googlegroups.com.

Marc Hoffmann

unread,
Jun 24, 2019, 4:51:55 AM6/24/19
to jac...@googlegroups.com
Hi,

have a look at 

./target/surefire-reports/com.sos.saloons.service.rest.resources.AboutResourceTest.txt

for the full stack trace.

Regards,
-marc

JD Smith

unread,
Jun 24, 2019, 8:31:29 AM6/24/19
to jac...@googlegroups.com

Marc,

 

No additional info in AboutResoruceTest.txt:

 

-------------------------------------------------------------------------------

Test set: com.sos.saloons.service.rest.resources.AboutResourceTest

-------------------------------------------------------------------------------

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.75 s <<< FAILURE! - in com.sos.saloons.service.rest.resources.AboutResourceTest

getAboutTest  Time elapsed: 0.032 s  <<< ERROR!

Evgeny Mandrikov

unread,
Jun 24, 2019, 10:34:17 AM6/24/19
to JaCoCo and EclEmma Users

On Monday, June 24, 2019 at 2:31:29 PM UTC+2, jahunsmythe wrote:

Marc,

 

No additional info in AboutResoruceTest.txt


Even if you can't find full stack trace,
I'm pretty sure that you compile into Java 11 class files,
JMockit fails with ArrayIndexOutOfBounds with JaCoCo 0.8.4 on Java 11 class files

Evgeny Mandrikov

unread,
Jun 24, 2019, 11:02:19 AM6/24/19
to JaCoCo and EclEmma Users


On Monday, June 24, 2019 at 12:48:12 AM UTC+2, jahunsmythe wrote:

Evgeny,

 

Thanks for the response.

 

JMockit 1.47 isn’t released yet, according to the JMockit website.  That is why I upgraded to 1.46 rather than 1.47.  And 1.47 isn’t available on Maven Central yet.

 

I looked at the classpath of the project in Eclipse, which is generated from the Maven pom.xml, and it has JMockit 1.46. 

 

In the pom.xml, for the maven-surefire-plugin, I have explicitly specified the ASM 7.1 as a dependency.   I even explicitly added ASM 7.1 to be a test dependency in the pom.xml (outside of maven-surefire-plugin), and that didn’t fix it either.


Of course addition of ASM as dependency doesn't help, because
JMockit has its own bytecode manipulation package "mockit.asm" ( https://github.com/jmockit/jmockit1/tree/master/main/src/mockit/asm )
that is not ASM library ( org.objectweb.asm ).

 

Since this builds correctly on the command line, and does not in Eclipse 2019-03, and the dependencies are correct in Eclipse for the project, this has to be an Eclipse problem.  There is something internal to Eclipse that is pulling in an older version of ASM that doesn’t have the NestHost/NestMembers problem fix, as you pointed out in the stack trace.


I haven't talked about ASM dependency at all, and
pointed out that your stacktrace shows usage of old JMockit.

Hope now clear that JMockit has nothing do with ASM libarary.


And AFAIK JMockit uses Java agent, so you should check not only classpath, but also VM arguments.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages