Tried to execute gu install native-image due for GraalVM's native image Maven plugin is failing with the well known Fatal error: java.lang.UnsupportedOperationException: java.lang.UnsupportedOperationException. Pulled a fresh copy from the releases section but I'm unable to install the _native-image_ plugin as there is no such gu application distributed with the zip or found in the path.
Am I missing something?
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-20190603180034.buildslave.jdk8u-src-tar--b03)
OpenJDK 64-Bit GraalVM CE 19.0.2 (build 25.212-b03-jvmci-19-b04, mixed mode)
Used releases: https://github.com/oracle/graal/releases/tag/vm-19.0.2
C:\GraalVM\bin file tree: https://hasteb.in/befonola.gradle
Maven Output: https://hasteb.in/gefobapo.yaml
Maven Output (Verbose): https://hasteb.in/ewifodam.kotlin



Hello @4zuree, thanks for your interest in GraalVM.
GraalVM CE for Windows (Early adopter) does not include gu, but it already includes native-image (i.e., you do not need to install it).
Could you please provide more information about your issue with the Maven plugin?
Information about the Maven build is already provided. There are two links heading over to https://hasteb.in/. The first link will show you Maven's normal non-verbose output. The second link will show you Maven's build output with -X (verbose) enabled.
@4zuree thanks for trying our early adopter release.
Your provided log output
[INFO] --- native-image-maven-plugin:1.0.0-rc14:native-image
shows that you are using a very old native-image-maven-plugin in combination with the most recent release.
Please update your pom file to use the version that matches the graalvm release your are using as JAVA_HOME. Let us know how that goes.
@olpaw Thank you for responding that quick.
I changed the version to 19.0.0 (which seems to be the latest according to this website) and the build still fails. Logs are provided down below.
https://hasteb.in/kicetibi.yaml (normal)
https://hasteb.in/nenewule.kotlin (debug)
https://hasteb.in/unujacaf.gradle (normal; _native-image-maven-plugin_ section only)
https://hasteb.in/dofodowe.sql (debug; _native-image-maven-plugin_ section only)
I changed the version to 19.0.0 (which seems to be the latest according to this website)
yea .. the 19.0.2 have not landed on maven central yet. give it a few more days.
Aight. Will wait until the 19.0.2 version is up in Maven Central. Thank you for your support so far @olpaw @ansalond. I'll let you know how the build goes as soon as the 19.0.2 version is up and running.
How long will it probably take until the 19.0.2 version of the plugin goes "live"? Can you give me an ETA?
https://hasteb.in/kicetibi.yaml (normal)
Looking at the output, I suspect this is a bug that I have already fixed on master (in 9c0a77f7307d429ee82c4c6f1f9ae023a9004d58) - though not on the 19.0 branch.
To verify that can you please temporarily remove all files that are not *.jar files from %JAVA_HOME%\jre\lib\jvmci and try again. Thx.
Wowzers. Removed the non *.jar files and this time it didn't fail with UnsupportedOperationException but rather fails with this one:
[INFO] --- native-image-maven-plugin:19.0.0:native-image (default) @ beacle-cli ---
[INFO] ImageClasspath Entry: org.beaconpowered.beacle:beacle-core:jar:2019.06.01-snapshot:compile (file:///D:/workspace/current/beaconpowered/source/beacle/core/target/beacle-core-2019.06.01-snapshot.jar)
[INFO] ImageClasspath Entry: org.slf4j:slf4j-api:jar:1.7.25:compile (file:///D:/environment/.m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar)
[INFO] ImageClasspath Entry: com.google.guava:guava:jar:27.1-jre:compile (file:///D:/environment/.m2/com/google/guava/guava/27.1-jre/guava-27.1-jre.jar)
[INFO] ImageClasspath Entry: com.google.guava:failureaccess:jar:1.0.1:compile (file:///D:/environment/.m2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar)
[INFO] ImageClasspath Entry: com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile (file:///D:/environment/.m2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar)
[INFO] ImageClasspath Entry: com.google.code.findbugs:jsr305:jar:3.0.2:compile (file:///D:/environment/.m2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar)
[INFO] ImageClasspath Entry: org.checkerframework:checker-qual:jar:2.5.2:compile (file:///D:/environment/.m2/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.jar)
[INFO] ImageClasspath Entry: com.google.errorprone:error_prone_annotations:jar:2.2.0:compile (file:///D:/environment/.m2/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.jar)
[INFO] ImageClasspath Entry: com.google.j2objc:j2objc-annotations:jar:1.1:compile (file:///D:/environment/.m2/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar)
[INFO] ImageClasspath Entry: org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile (file:///D:/environment/.m2/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.jar)
[INFO] ImageClasspath Entry: org.tinylog:slf4j-binding:jar:1.3.6:compile (file:///D:/environment/.m2/org/tinylog/slf4j-binding/1.3.6/slf4j-binding-1.3.6.jar)
[INFO] ImageClasspath Entry: org.tinylog:tinylog:jar:1.3.6:compile (file:///D:/environment/.m2/org/tinylog/tinylog/1.3.6/tinylog-1.3.6.jar)
[INFO] ImageClasspath Entry: info.picocli:picocli:jar:4.0.0-beta-1b:compile (file:///D:/environment/.m2/info/picocli/picocli/4.0.0-beta-1b/picocli-4.0.0-beta-1b.jar)
[INFO] ImageClasspath Entry: org.beaconpowered.beacle:beacle-cli:jar:2019.06.01-snapshot (file:///D:/workspace/current/beaconpowered/source/beacle/cli/target/beacle.jar)
[INFO] WorkingDirectory: D:\workspace\current\beaconpowered\source\beacle\cli\target
[INFO] ImageClasspath: D:\workspace\current\beaconpowered\source\beacle\core\target\beacle-core-2019.06.01-snapshot.jar;D:\environment\.m2\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\environment\.m2\com\google\guava\guava\27.1-jre\guava-27.1-jre.jar;D:\environment\.m2\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;D:\environment\.m2\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;D:\environment\.m2\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;D:\environment\.m2\org\checkerframework\checker-qual\2.5.2\checker-qual-2.5.2.jar;D:\environment\.m2\com\google\errorprone\error_prone_annotations\2.2.0\error_prone_annotations-2.2.0.jar;D:\environment\.m2\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;D:\environment\.m2\org\codehaus\mojo\animal-sniffer-annotations\1.17\animal-sniffer-annotations-1.17.jar;D:\environment\.m2\org\tinylog\slf4j-binding\1.3.6\slf4j-binding-1.3.6.jar;D:\environment\.m2\org\tinylog\tinylog\1.3.6\tinylog-1.3.6.jar;D:\environment\.m2\info\picocli\picocli\4.0.0-beta-1b\picocli-4.0.0-beta-1b.jar;D:\workspace\current\beaconpowered\source\beacle\cli\target\beacle.jar
[INFO] BuildArgs: [-H:Class=org.beaconpowered.beacle.cli.Bootstrap]
[org.beaconpowered.beacle.cli.bootstrap:5160] classlist: 1,782.98 ms
[org.beaconpowered.beacle.cli.bootstrap:5160] (cap): 332.40 ms
[org.beaconpowered.beacle.cli.bootstrap:5160] setup: 514.45 ms
Error: Unable to compile C-ABI query code. Make sure GCC toolchain is installed on your system.
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Beacle 2019.06.01-snapshot:
[INFO]
[INFO] Beacle ............................................. SUCCESS [ 1.130 s]
[INFO] Beacle Core ........................................ SUCCESS [ 1.206 s]
[INFO] Beacle CLI ......................................... FAILURE [ 4.765 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.182 s
[INFO] Finished at: 2019-06-18T16:42:40+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.substratevm:native-image-maven-plugin:19.0.0:native-image (default) on project beacle-cli: Error creating native image:: Image build request failed with exit status 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :beacle-cli
Now, I know this error and I actually did take actions to install WinSDK 7.1 (Also had to modify registry keys/values). Installed WinSDK 7.1 and tried using native-image to generate a AOT-compiled binary from a jar which apparently worked, although the console spit some ominous warnings at me.
How would that work with Maven? I had to run the Windows SDK 7.1 Command Prompt to "successfully" generate a native image.
The maven invocation that does the image building has to run in the context of the Windows SDK 7.1 Command Prompt.
Hm, so triggering the build inside IntelliJ or any other IDE is not an option? I have to open the Windows SDK 7.1 Command Prompt and trigger the build manually?
Hey you can also start IntelliJ from the SDK 7.1 Command Prompt ;-)
Aight, so I triggered the build inside and still got an error:
[INFO] --- native-image-maven-plugin:19.0.0:native-image (default) @ beacle-cli ---
[INFO] ImageClasspath Entry: org.beaconpowered.beacle:beacle-core:jar:2019.06.01-snapshot:compile (file:///D:/workspace/current/beaconpowered/source/beacle/core/target/beacle-core-2019.06.01-snapshot.jar)
[INFO] ImageClasspath Entry: org.slf4j:slf4j-api:jar:1.7.25:compile (file:///D:/environment/.m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar)
[INFO] ImageClasspath Entry: com.google.guava:guava:jar:27.1-jre:compile (file:///D:/environment/.m2/com/google/guava/guava/27.1-jre/guava-27.1-jre.jar)
[INFO] ImageClasspath Entry: com.google.guava:failureaccess:jar:1.0.1:compile (file:///D:/environment/.m2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar)
[INFO] ImageClasspath Entry: com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile (file:///D:/environment/.m2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar)
[INFO] ImageClasspath Entry: com.google.code.findbugs:jsr305:jar:3.0.2:compile (file:///D:/environment/.m2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar)
[INFO] ImageClasspath Entry: org.checkerframework:checker-qual:jar:2.5.2:compile (file:///D:/environment/.m2/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.jar)
[INFO] ImageClasspath Entry: com.google.errorprone:error_prone_annotations:jar:2.2.0:compile (file:///D:/environment/.m2/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.jar)
[INFO] ImageClasspath Entry: com.google.j2objc:j2objc-annotations:jar:1.1:compile (file:///D:/environment/.m2/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar)
[INFO] ImageClasspath Entry: org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile (file:///D:/environment/.m2/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.jar)
[INFO] ImageClasspath Entry: org.tinylog:slf4j-binding:jar:1.3.6:compile (file:///D:/environment/.m2/org/tinylog/slf4j-binding/1.3.6/slf4j-binding-1.3.6.jar)
[INFO] ImageClasspath Entry: org.tinylog:tinylog:jar:1.3.6:compile (file:///D:/environment/.m2/org/tinylog/tinylog/1.3.6/tinylog-1.3.6.jar)
[INFO] ImageClasspath Entry: info.picocli:picocli:jar:4.0.0-beta-1b:compile (file:///D:/environment/.m2/info/picocli/picocli/4.0.0-beta-1b/picocli-4.0.0-beta-1b.jar)
[INFO] ImageClasspath Entry: org.beaconpowered.beacle:beacle-cli:jar:2019.06.01-snapshot (file:///D:/workspace/current/beaconpowered/source/beacle/cli/target/beacle.jar)
[INFO] WorkingDirectory: D:\workspace\current\beaconpowered\source\beacle\cli\target
[INFO] ImageClasspath: D:\workspace\current\beaconpowered\source\beacle\core\target\beacle-core-2019.06.01-snapshot.jar;D:\environment\.m2\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\environment\.m2\com\google\guava\guava\27.1-jre\guava-27.1-jre.jar;D:\environment\.m2\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;D:\environment\.m2\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;D:\environment\.m2\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;D:\environment\.m2\org\checkerframework\checker-qual\2.5.2\checker-qual-2.5.2.jar;D:\environment\.m2\com\google\errorprone\error_prone_annotations\2.2.0\error_prone_annotations-2.2.0.jar;D:\environment\.m2\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;D:\environment\.m2\org\codehaus\mojo\animal-sniffer-annotations\1.17\animal-sniffer-annotations-1.17.jar;D:\environment\.m2\org\tinylog\slf4j-binding\1.3.6\slf4j-binding-1.3.6.jar;D:\environment\.m2\org\tinylog\tinylog\1.3.6\tinylog-1.3.6.jar;D:\environment\.m2\info\picocli\picocli\4.0.0-beta-1b\picocli-4.0.0-beta-1b.jar;D:\workspace\current\beaconpowered\source\beacle\cli\target\beacle.jar
[INFO] BuildArgs: [-H:Class=org.beaconpowered.beacle.cli.Bootstrap]
[org.beaconpowered.beacle.cli.bootstrap:18392] classlist: 1,791.85 ms
[org.beaconpowered.beacle.cli.bootstrap:18392] (cap): 1,790.54 ms
[org.beaconpowered.beacle.cli.bootstrap:18392] setup: 2,618.14 ms
[org.beaconpowered.beacle.cli.bootstrap:18392] analysis: 6,713.68 ms
Error: Error encountered while parsing org.pmw.tinylog.EnvironmentHelper.resolveDialect()
Parsing context:
parsing org.pmw.tinylog.EnvironmentHelper.<clinit>(Unknown Source)
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Beacle 2019.06.01-snapshot:
[INFO]
[INFO] Beacle ............................................. SUCCESS [ 1.153 s]
[INFO] Beacle Core ........................................ SUCCESS [ 1.213 s]
[INFO] Beacle CLI ......................................... FAILURE [ 13.484 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.974 s
[INFO] Finished at: 2019-06-18T17:05:34+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.substratevm:native-image-maven-plugin:19.0.0:native-image (default) on project beacle-cli: Error creating native image:: Image build request failed with exit status 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :beacle-cli
This error might not be related to this issue but can you tell me what's going on? The error message is kinda confusing and doesn't tell me what the problem is.
Hey you can also start IntelliJ from the SDK 7.1 Command Prompt ;-)
Nah, I rather stick with the command prompt. :)
This error might not be related to this issue but can you tell me what's going on? The error message is kinda confusing and doesn't tell me what the problem is.
I need more details for that. Please add
configuration>
<buildArgs>
-H:+ReportExceptionStackTraces
</buildArgs>
</configuration>
to the native-image-maven-plugin in your pom.
There you go!
[INFO] --- native-image-maven-plugin:19.0.0:native-image (default) @ beacle-cli ---
[INFO] ImageClasspath Entry: org.beaconpowered.beacle:beacle-core:jar:2019.06.01-snapshot:compile (file:///D:/workspace/current/beaconpowered/source/beacle/core/target/beacle-core-2019.06.01-snapshot.jar)
[INFO] ImageClasspath Entry: org.slf4j:slf4j-api:jar:1.7.25:compile (file:///D:/environment/.m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar)
[INFO] ImageClasspath Entry: com.google.guava:guava:jar:27.1-jre:compile (file:///D:/environment/.m2/com/google/guava/guava/27.1-jre/guava-27.1-jre.jar)
[INFO] ImageClasspath Entry: com.google.guava:failureaccess:jar:1.0.1:compile (file:///D:/environment/.m2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar)
[INFO] ImageClasspath Entry: com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile (file:///D:/environment/.m2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar)
[INFO] ImageClasspath Entry: com.google.code.findbugs:jsr305:jar:3.0.2:compile (file:///D:/environment/.m2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar)
[INFO] ImageClasspath Entry: org.checkerframework:checker-qual:jar:2.5.2:compile (file:///D:/environment/.m2/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.jar)
[INFO] ImageClasspath Entry: com.google.errorprone:error_prone_annotations:jar:2.2.0:compile (file:///D:/environment/.m2/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.jar)
[INFO] ImageClasspath Entry: com.google.j2objc:j2objc-annotations:jar:1.1:compile (file:///D:/environment/.m2/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar)
[INFO] ImageClasspath Entry: org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile (file:///D:/environment/.m2/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17.jar)
[INFO] ImageClasspath Entry: org.tinylog:slf4j-binding:jar:1.3.6:compile (file:///D:/environment/.m2/org/tinylog/slf4j-binding/1.3.6/slf4j-binding-1.3.6.jar)
[INFO] ImageClasspath Entry: org.tinylog:tinylog:jar:1.3.6:compile (file:///D:/environment/.m2/org/tinylog/tinylog/1.3.6/tinylog-1.3.6.jar)
[INFO] ImageClasspath Entry: info.picocli:picocli:jar:4.0.0-beta-1b:compile (file:///D:/environment/.m2/info/picocli/picocli/4.0.0-beta-1b/picocli-4.0.0-beta-1b.jar)
[INFO] ImageClasspath Entry: org.beaconpowered.beacle:beacle-cli:jar:2019.06.01-snapshot (file:///D:/workspace/current/beaconpowered/source/beacle/cli/target/beacle.jar)
[INFO] WorkingDirectory: D:\workspace\current\beaconpowered\source\beacle\cli\target
[INFO] ImageClasspath: D:\workspace\current\beaconpowered\source\beacle\core\target\beacle-core-2019.06.01-snapshot.jar;D:\environment\.m2\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\environment\.m2\com\google\guava\guava\27.1-jre\guava-27.1-jre.jar;D:\environment\.m2\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;D:\environment\.m2\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;D:\environment\.m2\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;D:\environment\.m2\org\checkerframework\checker-qual\2.5.2\checker-qual-2.5.2.jar;D:\environment\.m2\com\google\errorprone\error_prone_annotations\2.2.0\error_prone_annotations-2.2.0.jar;D:\environment\.m2\com\google\j2objc\j2objc-annotations\1.1\j2objc-annotations-1.1.jar;D:\environment\.m2\org\codehaus\mojo\animal-sniffer-annotations\1.17\animal-sniffer-annotations-1.17.jar;D:\environment\.m2\org\tinylog\slf4j-binding\1.3.6\slf4j-binding-1.3.6.jar;D:\environment\.m2\org\tinylog\tinylog\1.3.6\tinylog-1.3.6.jar;D:\environment\.m2\info\picocli\picocli\4.0.0-beta-1b\picocli-4.0.0-beta-1b.jar;D:\workspace\current\beaconpowered\source\beacle\cli\target\beacle.jar
[INFO] BuildArgs: [-H:+ReportExceptionStackTraces, -H:Class=org.beaconpowered.beacle.cli.Bootstrap]
[org.beaconpowered.beacle.cli.bootstrap:16312] classlist: 1,707.29 ms
[org.beaconpowered.beacle.cli.bootstrap:16312] (cap): 1,732.60 ms
[org.beaconpowered.beacle.cli.bootstrap:16312] setup: 2,510.49 ms
[org.beaconpowered.beacle.cli.bootstrap:16312] analysis: 6,607.20 ms
Error: Error encountered while parsing org.pmw.tinylog.EnvironmentHelper.resolveDialect()
Parsing context:
parsing org.pmw.tinylog.EnvironmentHelper.<clinit>(Unknown Source)
com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing org.pmw.tinylog.EnvironmentHelper.resolveDialect()
Parsing context:
parsing org.pmw.tinylog.EnvironmentHelper.<clinit>(Unknown Source)
at com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:138)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:323)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)
at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:346)
at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:509)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:171)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError: java.lang.NoClassDefFoundError
at parsing org.pmw.tinylog.runtime.ModernJavaRuntime.<clinit>(Unknown Source)
at org.graalvm.compiler.java.BytecodeParser.throwParserError(BytecodeParser.java:2621)
at org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3421)
at org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3223)
at org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:944)
at org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:838)
at org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
at org.graalvm.compiler.java.GraphBuilderPhase.run(GraphBuilderPhase.java:55)
at org.graalvm.compiler.java.GraphBuilderPhase.run(GraphBuilderPhase.java:40)
at org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)
at org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:139)
at com.oracle.svm.hosted.substitute.UnsafeAutomaticSubstitutionProcessor.getStaticInitializerGraph(UnsafeAutomaticSubstitutionProcessor.java:895)
at com.oracle.svm.hosted.substitute.UnsafeAutomaticSubstitutionProcessor.computeSubstitutions(UnsafeAutomaticSubstitutionProcessor.java:314)
at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:188)
at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:263)
at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:204)
at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupType(WrappedConstantPool.java:154)
at org.graalvm.compiler.java.BytecodeParser.lookupType(BytecodeParser.java:4229)
at org.graalvm.compiler.java.BytecodeParser.genNewInstance(BytecodeParser.java:4472)
at org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5260)
at org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3416)
at org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3223)
at org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:944)
at org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:838)
at org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)
at org.graalvm.compiler.phases.Phase.run(Phase.java:49)
at org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)
at org.graalvm.compiler.phases.Phase.apply(Phase.java:42)
at org.graalvm.compiler.phases.Phase.apply(Phase.java:38)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:214)
at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:333)
at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)
... 10 more
Caused by: java.lang.NoClassDefFoundError
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.lookupTypeInternal(HotSpotJVMCIRuntime.java:641)
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.lookupType(HotSpotJVMCIRuntime.java:620)
at jdk.vm.ci.hotspot.HotSpotResolvedObjectTypeImpl.lookupType(HotSpotResolvedObjectTypeImpl.java:961)
at jdk.vm.ci.meta.UnresolvedJavaType.resolve(UnresolvedJavaType.java:92)
at org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1739)
at org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1529)
at org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1509)
at org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5257)
at org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3416)
... 39 more
Caused by: java.lang.ClassNotFoundException: java.lang.ProcessHandle
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at jdk.vm.ci.hotspot.CompilerToVM.lookupType(Native Method)
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.lookupTypeInternal(HotSpotJVMCIRuntime.java:633)
... 47 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Beacle 2019.06.01-snapshot:
[INFO]
[INFO] Beacle ............................................. SUCCESS [ 1.149 s]
[INFO] Beacle Core ........................................ SUCCESS [ 1.276 s]
[INFO] Beacle CLI ......................................... FAILURE [ 13.958 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.507 s
[INFO] Finished at: 2019-06-18T17:13:51+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.substratevm:native-image-maven-plugin:19.0.0:native-image (default) on project beacle-cli: Error creating native image:: Image build request failed with exit status 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :beacle-cli
This is the one limitation that native-image building will always have. We cannot do classloading at image runtime. See https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md#dynamic-class-loading--unloading
If your application allows to run the static initializer of org.pmw.tinylog.EnvironmentHelper at image build time (in contrast to image runtime) you might be able to steer around this issue.
Try adding:
configuration>
<buildArgs>
--initialize-at-build-time=org.pmw.tinylog.EnvironmentHelper
-H:+ReportExceptionStackTraces
</buildArgs>
</configuration>
Hm, alright. This is another issue though and I'll have to deal with that myself. I consider this issue as resolved and can be closed. Thank you for your help! @olpaw
Mmm... are you sure that this issue should be closed? The initial problem is still there AFAICT.
The actual issue is about the Maven plugin failing with the UnsupportedOperationException. This issue is actually "already fixed":
https://hasteb.in/kicetibi.yaml (normal)
Looking at the output, I suspect this is a bug that I have already fixed on master (in 9c0a77f) - though not on the 19.0 branch.
To verify that can you please temporarily remove all files that are not
*.jarfiles from%JAVA_HOME%\jre\lib\jvmciand try again. Thx.
Now, you can keep the issue open and wait until the 19.0.2 is up and downloadable from Maven Central but I'd rather close the issue. It's up to @olpaw
@4zuree OK but, since it has not been committed in the 19.0 branch, we need to know what is the milestone that we should expect this will be fixed. For sure, 19.0.2 has not the fix, at least for what I understood.
@olpaw Can you re-open the issue please?
I will initiate a backport for https://github.com/oracle/graal/issues/1397#issuecomment-503165921
Aight, the 19.0.2 version is in the Maven Central repository available. That's good. Just checked that (here)
I tried with GraalVM 19.1.0 and plugin version 19.1.0 and the initial error does not appear, so I suppose this issue can be closed.
@apetrelli thanks for checking!