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

Is Java 21 supported? #295

Closed
hopper-signifyd opened this issue Jul 10, 2024 · 1 comment
Closed

Is Java 21 supported? #295

hopper-signifyd opened this issue Jul 10, 2024 · 1 comment

Comments

@hopper-signifyd
Copy link

Based on this PR, it looks like Java 21 is supported. I have a project which is using the latest version of this plugin + Java 21 (for both the Gradle runtime JVM and the toolchain version). When I run tests and they fail in a way that would trigger the retry logic of this plugin, the build exits with an exception.

javap is reporting a major version of 65 (Java 21) for the classes that have been compiled. My Gradle build scan reports that the Gradle build ran on Java 21 and the test task ran with the Java 21 toolchain. I'm on version 1.5.9 of the plugin. Why is this error popping up?

Stacktrace:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':my-project:test'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:130)
        at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:128)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:116)
        at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
        at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
        at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
        at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
        at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
        at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
        at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65
        at org.gradle.testretry.org.objectweb.asm.ClassReader.<init>(ClassReader.java:199)
        at org.gradle.testretry.org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
        at org.gradle.testretry.org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
        at org.gradle.testretry.org.objectweb.asm.ClassReader.<init>(ClassReader.java:287)
        at org.gradle.testretry.internal.testsreader.TestsReader.visit(TestsReader.java:72)
        at org.gradle.testretry.internal.testsreader.TestsReader.visitClassFile(TestsReader.java:65)
        at org.gradle.testretry.internal.testsreader.TestsReader.lambda$readTestClassDirClass$1(TestsReader.java:51)
        at org.gradle.testretry.internal.testsreader.TestsReader.readTestClassDirClass(TestsReader.java:51)
        at org.gradle.testretry.internal.testsreader.TestsReader.readClass(TestsReader.java:55)
        at org.gradle.testretry.internal.filter.AnnotationInspectorImpl.getClassAnnotations(AnnotationInspectorImpl.java:46)
        at org.gradle.testretry.internal.filter.ClassRetryMatcher.retryWholeClass(ClassRetryMatcher.java:59)
        at org.gradle.testretry.internal.executer.RetryTestResultProcessor.addRetry(RetryTestResultProcessor.java:118)
        at org.gradle.testretry.internal.executer.RetryTestResultProcessor.failure(RetryTestResultProcessor.java:175)
        at org.gradle.testretry.internal.executer.RetryTestResultProcessor.failure(RetryTestResultProcessor.java:165)
        at org.gradle.api.internal.tasks.testing.results.AttachParentTestResultProcessor.failure(AttachParentTestResultProcessor.java:47)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.dispatch.FailureHandlingDispatch.dispatch(FailureHandlingDispatch.java:30)
        at org.gradle.internal.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:87)
        at org.gradle.internal.dispatch.AsyncDispatch.access$000(AsyncDispatch.java:36)
        at org.gradle.internal.dispatch.AsyncDispatch$1.run(AsyncDispatch.java:71)
        at org.gradle.internal.concurrent.InterruptibleRunnable.run(InterruptibleRunnable.java:42)
        at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
        at org.gradle.internal.operations.CurrentBuildOperationPreservingRunnable.run(CurrentBuildOperationPreservingRunnable.java:51)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
@hopper-signifyd
Copy link
Author

Closing this. It turns out we were referencing two different versions of this plugin in our repository. Updating both instances to 1.5.9 fixed the issue. Good times.

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