Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting java.lang.IllegalArgumentException: Unsupported class file major version 58 #196

Closed
ghost opened this issue Apr 1, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 1, 2020

Getting a java.lang.IllegalArgumentException: Unsupported class file major version 58 when executing ./gradlew pitests with pluging 'info.solidsoft.pitest' version '1.4.7' and JAVA14

My project setup:

$ ./gradlew --version

------------------------------------------------------------
Gradle 6.3
------------------------------------------------------------

Build time:   2020-03-24 19:52:07 UTC
Revision:     bacd40b727b0130eeac8855ae3f9fd9a0b207c60

Kotlin:       1.3.70
Groovy:       2.5.10
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          14 (AdoptOpenJDK 14+36)
OS:           Mac OS X 10.15.3 x86_64

Output when executing ./gradlew pitests:

$ ./gradlew pitest

> Task :pitest FAILED
1:32:07 PM PIT >> INFO : Verbose logging is disabled. If you encounter an problem please enable it before reporting an issue.
Exception in thread "main" java.lang.IllegalArgumentException: Unsupported class file major version 58
        at org.pitest.reloc.asm.ClassReader.<init>(ClassReader.java:176)
        at org.pitest.reloc.asm.ClassReader.<init>(ClassReader.java:158)
        at org.pitest.reloc.asm.ClassReader.<init>(ClassReader.java:146)
        at org.pitest.classinfo.ClassInfoVisitor.getClassInfo(ClassInfoVisitor.java:41)
        at org.pitest.classinfo.Repository.nameToClassInfo(Repository.java:70)
        at org.pitest.classinfo.Repository.fetchClass(Repository.java:60)
        at org.pitest.classinfo.NameToClassInfo.apply(NameToClassInfo.java:17)
        at org.pitest.classinfo.NameToClassInfo.apply(NameToClassInfo.java:7)
        at java.base/java.util.function.Function.lambda$andThen$1(Function.java:88)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1624)
        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.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at org.pitest.classpath.CodeSource.getCode(CodeSource.java:43)
        at org.pitest.mutationtest.verify.DefaultBuildVerifier.verify(DefaultBuildVerifier.java:32)
        at org.pitest.mutationtest.tooling.MutationCoverage.verifyBuildSuitableForMutationTesting(MutationCoverage.java:223)
        at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:111)
        at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:116)
        at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:49)
        at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:87)
        at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:45)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':pitest'.
> Process 'command '/Users/custom_user/.sdkman/candidates/java/14.0.0.hs-adpt/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insigh
ts.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s
6 actionable tasks: 1 executed, 5 up-to-date

Does info.solidsoft.pitest version1.4.7 supports Java14?

@ghost
Copy link
Author

ghost commented Apr 1, 2020

Solved:
For Java-14 set Pitest v'1.5.1' (on pitest gradlew task) and info.solidsoft.pitest' version '1.4.7'
File build.gradle:

plugins {
    id 'info.solidsoft.pitest' version '1.4.7'
}

...

pitest {
    pitestVersion = '1.5.1'
    ...
}

@ghost ghost closed this as completed Apr 1, 2020
@szpak
Copy link
Owner

szpak commented Apr 1, 2020

Yes, 1.5.1 should be used for Java 14 - hcoles/pitest#748 . I will be available by default in the next GPP version.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant