Open AbhideepChakravarty opened 3 years ago
I also tried adding --no-fallback in the native image build command. When I did that, I got this : Sending build context to Docker daemon 212kB
Step 1/10 : FROM oracle/graalvm-ce:20.2.0-java8 as graalvm ---> 94c408b22947 Step 2/10 : RUN gu install native-image ---> Using cache ---> 45c9811fc8e5 Step 3/10 : COPY . /home/app/aawp-rest ---> 29576ba87756 Step 4/10 : WORKDIR /home/app/aawp-rest ---> Running in 5d1a63915985 Removing intermediate container 5d1a63915985 ---> 720998a6c015 Step 5/10 : RUN native-image --no-fallback -cp target/aawp-rest-*.jar -H:Name=aawp-rest -H:Class=com.fastserve.aawp.Application -H:+ReportExceptionStackTraces ---> Running in 7eac445dfe91 [aawp-rest:24] classlist: 3,483.86 ms, 1.11 GB [aawp-rest:24] (cap): 1,090.59 ms, 1.11 GB [aawp-rest:24] setup: 3,504.26 ms, 1.52 GB [aawp-rest:24] (clinit): 161.95 ms, 1.52 GB [aawp-rest:24] (typeflow): 4,844.54 ms, 1.52 GB [aawp-rest:24] (objects): 3,402.06 ms, 1.52 GB [aawp-rest:24] (features): 231.72 ms, 1.52 GB [aawp-rest:24] analysis: 8,831.92 ms, 1.52 GB [91mError: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: io.micronaut.runtime.Micronaut. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time. Detailed message: Trace: at parsing com.fastserve.aawp.Application.main(Application.java:8) Call path from entry point to com.fastserve.aawp.Application.main(String[]): at com.fastserve.aawp.Application.main(Application.java:8) at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:149) at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:184) at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
[0m[91mcom.oracle.svm.core.util.UserError$UserException: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: io.micronaut.runtime.Micronaut. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time. Detailed message: Trace: at parsing com.fastserve.aawp.Application.main(Application.java:8) Call path from entry point to com.fastserve.aawp.Application.main(String[]): at com.fastserve.aawp.Application.main(Application.java:8) at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:149) at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:184) at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0) [0m[91m [0m[91m at com.oracle.svm.core.util.UserError.abort(UserError.java:79)[0m[91m [0m[91m at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:217)[0m[91m [0m[91m at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:765)[0m[91m [0m[91m at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:555)[0m[91m [0m[91m at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:468)[0m[91m [0m[91m at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)[0m[91m [0m[91m at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)[0m[91m [0m[91m at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)[0m[91m [0m[91m at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)[0m[91m [0m[91m at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:163)[0m[91m [0m[91mCaused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: io.micronaut.runtime.Micronaut. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time. Detailed message: Trace: at parsing com.fastserve.aawp.Application.main(Application.java:8) Call path from entry point to com.fastserve.aawp.Application.main(String[]): at com.fastserve.aawp.Application.main(Application.java:8) at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:149) at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:184) at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0) [0m[91m [0m[91m at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)[0m[91m [0m[91m at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:762)[0m[91m [0m[91m ... 7 more[0m[91m [0m[91mCaused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: io.micronaut.runtime.Micronaut. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time. at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.reportUnresolvedElement(SharedGraphBuilderPhase.java:265) at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedType(SharedGraphBuilderPhase.java:220) at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedMethod(SharedGraphBuilderPhase.java:246) [0m[91m at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.handleUnresolvedInvoke(SharedGraphBuilderPhase.java:209) [0m[91m at org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1650) [0m[91m at org.graalvm.compiler.java.BytecodeParser.genInvokeStatic(BytecodeParser.java:1625) [0m[91m at org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5340) at org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3413) [0m[91m at org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:3220) at org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:1090)[0m[91m [0m[91m at org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:984)[0m[91m [0m[91m at org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:84)[0m[91m [0m[91m at com.oracle.svm.hosted.phases.SharedGraphBuilderPhase.run(SharedGraphBuilderPhase.java:74)[0m[91m at org.graalvm.compiler.phases.Phase.run(Phase.java:49)[0m[91m [0m[91m at org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:214)[0m[91m [0m[91m at org.graalvm.compiler.phases.Phase.apply(Phase.java:42)[0m[91m [0m[91m at org.graalvm.compiler.phases.Phase.apply(Phase.java:38)[0m[91m [0m[91m at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:223)[0m[91m [0m[91m at com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:357) at com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:313) [0m[91m at com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:302) at com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:103) at com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:434) at com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:552) [0m[91m at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:173) at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) [0m[91m ... 4 more [0m[91mError: Image build request failed with exit status 1 [0m
@aalmiray Can someone tell me if it is a bug or I am doing something wrong?
Can you try with with mvn package -Dpackaging=docker-native
Also please try the latest version of launch which is 2.2.0
I am using 2.2.0 and I tried -Dpacking option as suggested by you. Same results: Error: No bin/java and no environment variable JAVA_HOME
During the dockerization process, I can see graalVM warning saying standalone image creation is being aborted. That gave me the hint that it wont work and docker run gave the confirmation.
As per the error it seems you have misconfigured your JAVA_HOME variable
Where? It's a docker build command execution which is creating a not executable container? Where should I configure the JAVA_HOME? Inside the Dockerfile given by Micronaut? Or on my laptop? How is my laptop's JAVA_HOME is gonna impact the docker build process?
On Mon, Nov 23, 2020 at 7:31 PM Graeme Rocher notifications@github.com wrote:
As per the error it seems you have misconfigured your JAVA_HOME variable
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/micronaut-projects/micronaut-starter/issues/577#issuecomment-732180252, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACE5DTRNVUWD76HNADES53LSRJTMJANCNFSM4T5ODRNQ .
I have no idea regarding the JAVA_HOME
problem you mention. The following command does fail for me however:
curl https://launch.micronaut.io/demo.zip\?build\=maven\&features\=jax-rs\&features\=graalvm -o demo.zip && unzip demo.zip -d demo && cd demo && ./mvnw package -Dpackaging=docker-native
With the error:
Error: Classes that should be initialized at run time got initialized during image building:
javax.ws.rs.ext.RuntimeDelegate was unintentionally initialized at build time. To see why javax.ws.rs.ext.RuntimeDelegate got initialized use --trace-class-initialization=javax.ws.rs.ext.RuntimeDelegate
javax.ws.rs.ext.FactoryFinder was unintentionally initialized at build time. To see why javax.ws.rs.ext.FactoryFinder got initialized use --trace-class-initialization=javax.ws.rs.ext.FactoryFinder
io.micronaut.jaxrs.runtime.ext.impl.MicronautRuntimeDelegate the class was requested to be initialized at run time (from the command line). To see why io.micronaut.jaxrs.runtime.ext.impl.MicronautRuntimeDelegate got initialized use --trace-class-initialization=io.micronaut.jaxrs.runtime.ext.impl.MicronautRuntimeDelegate
Reported https://github.com/micronaut-projects/micronaut-jaxrs/issues/75 to track the issue with JAX-RS
Adding
<plugin>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>native-image-maven-plugin</artifactId>
<configuration>
<buildArgs>
<arg>--initialize-at-run-time=io.micronaut.jaxrs.runtime.ext.impl.LinkImpl</arg>
</buildArgs>
</configuration>
</plugin>
Resolves the issue when running ./mvn package -Dpackaging=native-image
@alvarosanchez How to get this config propagated to Docker?
@graemerocher I think that --initialize-at-run-time=io.micronaut.jaxrs.runtime.ext.impl.LinkImpl
should be added directly in micronaut-jaxrs
and not in Starter (or Maven/Gradlle) plugins.
of course that is why I reported https://github.com/micronaut-projects/micronaut-jaxrs/issues/75
I'm sorry but then I don't understand why we need to "propagate the config to Docker"...
To provide a workaround to the user for the issue until a fix is released
Oh, I see, thank you.
Another option is create the file native-image.properties
in their application with that option.
@ilopmar What should be added to the native-image properties ?
Also a big question - Framework - 2.2.0, Language - Java. Build tool - Maven, and Test tool (does not matter) - JUnit along with GraalVM - Isnt this the most obvious and common thing people start with? And when in today's world docker is almost defacto and one of the major reason, I guess, people migrate to your framework is the smaller footprint, how can something be released without testing the test case - Is the graalvm native image based docker container is running or not running? Looks like it is not running.
My feedback on user experience, if that matters: I read about Micronaut. I compared with Quarkus. I looked into both portal and then I by theoretical data it looked like Micronaut can be a better choice and I decided to do a PoC on Micronaut. I go to Launcher download the first code. Run in my machine, works as charm and then I create a docker container and it fail to run. Its like I can do the development but cant take it to production. Highly disappointing!! I ended up raising ISSUE after running my first Hello World rest API. I didnt even start coding/migrating the big stuff. How risky it can be, no matter how smaller the memory footprint is, not matter how many requests can be handled and whats the memory after peak load.
@AbhideepChakravarty Thanks for the feedback. As it happens you chose to use the JAX-RS feature which very few users actually use as most Micronaut users just use the built in annotations. It seems a bug slipped into the release whereby JAX-RS doesn't work in native image and you were the first to spot it, sorry for the bad luck
@AbhideepChakravarty You can create the file src/main/resources/META-INF/native-image/your.package/native-image.properties
with the content:
Args = --initialize-at-run-time=io.micronaut.jaxrs.runtime.ext.impl.LinkImp
@graemerocher Looks like thats always me !!
@ilopmar I tried that and executed mvn package -Dpackaging=docker-native. Post that I did docker build . -t aawp-rest:m5. Got the same JAVA_HOME error while running the image.
Then I added --no-fallback in Dockerfile and re-run docker build . -t aawp-rest:m6 and got this:
C:\Users\Admin\Downloads\aawp-rest>docker build . -t aawp-rest:m6
[+] Building 35.1s (11/13)
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 400B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/frolvlad/alpine-glibc:latest 2.5s
=> [internal] load metadata for docker.io/oracle/graalvm-ce:20.2.0-java8 2.5s
=> [stage-1 1/3] FROM docker.io/frolvlad/alpine-glibc@sha256:3a41627f9f0d51bef379b1c407a95f8635fb5a96751699e09825fd8e6fb69666 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 33.65kB 0.2s
=> [graalvm 1/5] FROM docker.io/oracle/graalvm-ce:20.2.0-java8@sha256:c0d9cd0620320dd8986bfdc11456edeb2a65efc3f1e02f59d4f33eb6511ae9e5 0.0s
=> CACHED [graalvm 2/5] RUN gu install native-image 0.0s
=> [graalvm 3/5] COPY . /home/app/aawp-rest 0.1s
=> [graalvm 4/5] WORKDIR /home/app/aawp-rest 0.1s
=> ERROR [graalvm 5/5] RUN native-image --no-fallback -cp target/aawp-rest-*.jar 31.9s
------
> [graalvm 5/5] RUN native-image --no-fallback -cp target/aawp-rest-*.jar:
#12 9.073 [aawp-rest:24] classlist: 7,461.40 ms, 1.04 GB
#12 11.86 [aawp-rest:24] (cap): 1,681.26 ms, 1.04 GB
#12 15.30 [aawp-rest:24] setup: 6,181.71 ms, 1.47 GB
#12 31.80 [aawp-rest:24] (clinit): 277.62 ms, 1.55 GB
#12 31.86 [aawp-rest:24] (typeflow): 9,357.06 ms, 1.55 GB
#12 31.86 [aawp-rest:24] (objects): 5,312.01 ms, 1.55 GB
#12 31.86 [aawp-rest:24] (features): 452.38 ms, 1.55 GB
#12 31.88 [aawp-rest:24] analysis: 15,892.53 ms, 1.55 GB
#12 31.88 Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: io.micronaut.runtime.Micronaut. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
#12 31.88 Detailed message:
#12 31.88 Trace:
#12 31.88 at parsing com.fastserve.aawp.Application.main(Application.java:8)
#12 31.88 Call path from entry point to com.fastserve.aawp.Application.main(String[]):
#12 31.88 at com.fastserve.aawp.Application.main(Application.java:8)
#12 31.88 at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:149)
#12 31.88 at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:184)
#12 31.88 at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
#12 31.88
#12 31.88 Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
#12 31.91 Error: Image build request failed with exit status 1
------
failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c native-image --no-fallback -cp target/aawp-rest-*.jar]: runc did not terminate sucessfully
C:\Users\Admin\Downloads\aawp-rest>
@AbhideepChakravarty You are still building images yourself with docker build .
that is not what we have been saying. You should not have a Dockerfile
in the root of the project nor use docker build
anyway. The Maven tooling will build the docker image for you if you have created a 2.2.0 application when running mvn package -Dpackaging=docker-native
If you have your own Dockerfile
then you are on your own as far as we are concerned in maintaining and defining it correctly
@AbhideepChakravarty Suggested reading https://micronaut.io/blog/2020-11-23-whats-new-maven.html
Thanks for reporting an issue, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.
NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (http://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.
Description
GraalVM native-image asks for JAVA_HOME or it cant find Micronaut. I used the launcher and created an Application with Maven and JUnit. I added features including GraalVM and Jax-RS. I w
Task List
Steps to Reproduce
Stack Trace
d:\Eclatian\Code\aawp\AppAdminWebAppRoot\facade\aawp-rest>docker build . -t aawp-rest:m1 [+] Building 526.0s (14/14) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 386B 0.1s => [internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/frolvlad/alpine-glibc:latest 4.0s => [internal] load metadata for docker.io/oracle/graalvm-ce:20.2.0-java8 4.0s => [internal] load build context 11.7s => => transferring context: 7.47MB 11.6s => [stage-1 1/3] FROM docker.io/frolvlad/alpine-glibc@sha256:3a41627f9f0d51bef379b1c407a95f8635fb5a96751699e09825fd8e6fb69666 15.9s => => resolve docker.io/frolvlad/alpine-glibc@sha256:3a41627f9f0d51bef379b1c407a95f8635fb5a96751699e09825fd8e6fb69666 0.0s => => sha256:3a41627f9f0d51bef379b1c407a95f8635fb5a96751699e09825fd8e6fb69666 739B / 739B 0.0s => => sha256:4c5945fbf2212c603ed8843b4153f9cb528f5fd99f07c49da5d27b86eb06c922 6.09kB / 6.09kB 0.0s => => sha256:df20fa9351a15782c64e6dddb2d4a6f50bf6d3688060a34c4014b0d9a752eb4c 2.80MB / 2.80MB 8.1s => => sha256:05154a797e786e7192036bc0459c2812c3c7574bf1566537ef90ab49b32a5774 5.72MB / 5.72MB 14.0s => => extracting sha256:df20fa9351a15782c64e6dddb2d4a6f50bf6d3688060a34c4014b0d9a752eb4c 0.8s => => extracting sha256:05154a797e786e7192036bc0459c2812c3c7574bf1566537ef90ab49b32a5774 1.2s => [graalvm 1/5] FROM docker.io/oracle/graalvm-ce:20.2.0-java8@sha256:c0d9cd0620320dd8986bfdc11456edeb2a65efc3f1e02f59d4f33eb6511ae9e5 303.2s => => resolve docker.io/oracle/graalvm-ce:20.2.0-java8@sha256:c0d9cd0620320dd8986bfdc11456edeb2a65efc3f1e02f59d4f33eb6511ae9e5 0.0s => => sha256:c0d9cd0620320dd8986bfdc11456edeb2a65efc3f1e02f59d4f33eb6511ae9e5 1.37kB / 1.37kB 0.0s => => sha256:94c408b2294729bc4c237d2f6c13d8ce5302aefdccc05d85f3c7e1641654f80a 4.86kB / 4.86kB 0.0s => => sha256:bce8f778fef067eed3d092243c838d674cb1ef39441d85d0ca84382084a69093 48.01MB / 48.01MB 92.7s => => sha256:8a3069484c0d1b37d049a11df986a5701ea6ef427bade131c73dd5c7e6038905 80.26MB / 80.26MB 124.0s => => sha256:257411b393455c190751fb43c658b4d3523d412721bda019e275ff8b6ab2ef05 3.42kB / 3.42kB 17.3s => => sha256:b1eb54da10569d3bfdc4b376a0324b4d89e69ce0ebe4245ac788679a7ce9f894 554B / 554B 19.2s => => sha256:467749c910c8837ed3e728f68d032be5b9aa90e748f2301a5df20e68b5b9f46b 342.33MB / 342.33MB 244.3s => => extracting sha256:bce8f778fef067eed3d092243c838d674cb1ef39441d85d0ca84382084a69093 17.1s => => extracting sha256:8a3069484c0d1b37d049a11df986a5701ea6ef427bade131c73dd5c7e6038905 22.0s => => extracting sha256:257411b393455c190751fb43c658b4d3523d412721bda019e275ff8b6ab2ef05 0.0s => => extracting sha256:b1eb54da10569d3bfdc4b376a0324b4d89e69ce0ebe4245ac788679a7ce9f894 0.0s => => extracting sha256:467749c910c8837ed3e728f68d032be5b9aa90e748f2301a5df20e68b5b9f46b 57.0s => [stage-1 2/3] RUN apk update && apk add libstdc++ 7.0s => [graalvm 2/5] RUN gu install native-image 14.9s => [graalvm 3/5] COPY . /home/app/aawp-rest 0.6s => [graalvm 4/5] WORKDIR /home/app/aawp-rest 0.1s => [graalvm 5/5] RUN native-image -cp target/aawp-rest-*.jar 200.8s => [stage-1 3/3] COPY --from=graalvm /home/app/aawp-rest/aawp-rest /app/aawp-rest 0.3s => exporting to image 0.4s => => exporting layers 0.4s => => writing image sha256:270284f6eea95a9cc33f20cc36161a76da76aed56e16aa78ccc022bafc3f3886 0.0s => => naming to docker.io/library/aawp-rest:m1 0.0s
d:\Eclatian\Code\aawp\AppAdminWebAppRoot\facade\aawp-rest>docker images REPOSITORY TAG IMAGE ID CREATED SIZE aawp-rest m1 270284f6eea9 8 seconds ago 25.9MB
d:\Eclatian\Code\aawp\AppAdminWebAppRoot\facade\aawp-rest>docker run -p 8080:8080 270284f6eea9 Error: No bin/java and no environment variable JAVA_HOME
Also, while building docker image, this warning comes up: => [graalvm 5/5] RUN native-image -cp target/aawp-rest-*.jar 57.4s => => # [aawp-rest:23] (cap): 1,559.75 ms, 1.14 GB => => # [aawp-rest:23] setup: 7,595.90 ms, 1.52 GB => => # [aawp-rest:23] (clinit): 570.63 ms, 1.52 GB => => # [aawp-rest:23] analysis: 24,801.19 ms, 1.52 GB => => # Warning: Aborting stand-alone image build due to unsupported features => => # Warning: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
While building the docker image on Ubuntu, this warning comes: Warning: Image 'aawp-rest' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation and to print more detailed information why a fallback image was nec essary).
Expected Behaviour
Docker image should run and application should be accessible.
Actual Behaviour
It asks for JAVA_HOME. GraalVM is creating a fall back native image it seems. Error is : D:\Eclatian\Code\micronautsample>docker run -p 8080:8080 aawp-rest:m1 Error: No bin/java and no environment variable JAVA_HOME
Environment Information
Example Application