fabienrenaud/java-json-benchmark

Execution failed for task ':compileJava'. > java.lang.reflect.UndeclaredThrowableException

lukehutch opened this issue · 5 comments

I just tried running java-json-benchmark on JDK 10.0.1 and with gradle-4.3.1-7.fc28.noarch, and got:

$ ./run-everything 
./gradlew clean build shadowJar

> Configure project : 
The apt configuration has been deprecated. Please use the annotationProcessor configuration instead.
The apt configuration has been deprecated. Please use the annotationProcessor configuration instead.
The apt configuration has been deprecated. Please use the annotationProcessor configuration instead.

Download https://repo.maven.apache.org/maven2/com/bluelinelabs/logansquare-compiler/1.3.7/logansquare-compiler-1.3.7.pom
Download https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.2/commons-lang3-3.2.pom
Download https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.2.0/javapoet-1.2.0.pom
Download https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.5.1/jackson-core-2.5.1.pom
Download https://repo.maven.apache.org/maven2/com/bluelinelabs/logansquare-compiler/1.3.7/logansquare-compiler-1.3.7.jar
Download https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.2.0/javapoet-1.2.0.jar
Download https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.2/commons-lang3-3.2.jar
Download https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.5.1/jackson-core-2.5.1.jar

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> java.lang.reflect.UndeclaredThrowableException

* 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 insights.

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings

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




$ ./run
./gradlew clean build shadowJar

> Configure project : 
The apt configuration has been deprecated. Please use the annotationProcessor configuration instead.
The apt configuration has been deprecated. Please use the annotationProcessor configuration instead.
The apt configuration has been deprecated. Please use the annotationProcessor configuration instead.


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> java.lang.reflect.UndeclaredThrowableException

* 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 insights.

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 0s
2 actionable tasks: 2 executed

I think it's actually a Gradle issue (the vast majority of legacy Java code runs unchanged on newer JDK versions), and I know nothing about Gradle.

Tracked down this issue to this gradle post: gradle/gradle#4931 which points to this java issue in java 9 and 10. https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8193802 the issue was fixed in java 10.0.2

Great, thanks for following up on this.