quarkus-integration-test-main build fails in native mode with JDK 11
See original GitHub issueDescribe the bug
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 19.3.0 CE
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] /Library/Java/JavaVirtualMachines/graalvm-ce-java11-19.3.0/Contents/Home/bin/native-image -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-DCoordinatorEnvironmentBean.transactionStatusManagerEnable=false -J-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -J-Drx.unsafe-disable=true -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -H:+TraceClassInitialization --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar quarkus-integration-test-main-999-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:+AddAllCharsets -H:EnableURLProtocols=http -H:+JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace quarkus-integration-test-main-999-SNAPSHOT-runner
[quarkus-integration-test-main-999-SNAPSHOT-runner:59246] classlist: 55,027.14 ms
17:30:04,443 INFO [com.sun.xml.bin.v2.run.ref.opt.AccessorInjector] The optimized code generation is disabled
[quarkus-integration-test-main-999-SNAPSHOT-runner:59246] (cap): 6,664.06 ms
[quarkus-integration-test-main-999-SNAPSHOT-runner:59246] setup: 11,877.16 ms
17:30:17,727 WARN [com.net.con.sou.URLConfigurationSource] No URLs will be polled as dynamic configuration sources.
17:30:17,730 INFO [com.net.con.sou.URLConfigurationSource] To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
17:30:17,914 INFO [org.hib.Version] HHH000412: Hibernate Core {5.4.10.Final}
17:30:17,974 INFO [org.hib.ann.com.Version] HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
17:30:18,115 INFO [org.hib.dia.Dialect] HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL95Dialect
17:30:18,516 INFO [org.hib.val.int.uti.Version] HV000001: Hibernate Validator 6.1.0.Final
17:30:19,258 INFO [io.und.web.jsr] UT026004: Adding annotated client endpoint class io.quarkus.it.websocket.CodingClient
17:30:19,268 INFO [io.und.web.jsr] UT026003: Adding annotated server endpoint class io.quarkus.it.websocket.EchoSocket for path /echo
17:30:19,270 INFO [io.und.web.jsr] UT026003: Adding annotated server endpoint class io.quarkus.it.websocket.RecodingSocket for path /recoder
17:30:19,272 INFO [io.und.web.jsr] UT026003: Adding annotated server endpoint class io.quarkus.it.websocket.WebSocketOpenEndpoint for path /wsopen
17:30:24,281 INFO [org.jbo.threads] JBoss Threads version 3.0.0.Final
Warning: RecomputeFieldValue.ArrayIndexScale automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) was detected in the static initializer of rx.internal.util.unsafe.ConcurrentCircularArrayQueue. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) for the array index scale computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
Warning: RecomputeFieldValue.ArrayBaseOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) was detected in the static initializer of rx.internal.util.unsafe.ConcurrentCircularArrayQueue. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) for the array base offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
Warning: RecomputeFieldValue.ArrayIndexScale automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) was detected in the static initializer of rx.internal.util.unsafe.SpscUnboundedArrayQueue. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) for the array index scale computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
[quarkus-integration-test-main-999-SNAPSHOT-runner:59246] (typeflow): 339,039.88 ms
[quarkus-integration-test-main-999-SNAPSHOT-runner:59246] (objects): 178,988.84 ms
[quarkus-integration-test-main-999-SNAPSHOT-runner:59246] (features): 7,470.16 ms
[quarkus-integration-test-main-999-SNAPSHOT-runner:59246] analysis: 549,308.79 ms
Error: No instances of java.io.FilePermission are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Detailed message:
Trace: object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object java.io.FilePermissionCollection
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object java.security.Permissions
object java.security.ProtectionDomain
object java.security.ProtectionDomain[]
object java.security.AccessControlContext
object java.util.concurrent.Executors$PrivilegedThreadFactory
object io.smallrye.faulttolerance.DefaultHystrixConcurrencyStrategy
object io.quarkus.arc.impl.InstanceHandleImpl
object java.lang.Object[]
object java.util.ArrayList
object java.util.Collections$SynchronizedRandomAccessList
object io.quarkus.arc.impl.CreationalContextImpl
object io.quarkus.arc.impl.InstanceImpl
object io.smallrye.faulttolerance.HystrixInitializer
object io.quarkus.arc.impl.ContextInstanceHandleImpl
object io.quarkus.arc.impl.LazyValue
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object io.quarkus.arc.impl.ComputingCache
object io.quarkus.arc.impl.ApplicationContext
object io.quarkus.arc.impl.ArcContainerImpl
object java.util.concurrent.atomic.AtomicReference
method io.quarkus.arc.Arc.shutdown()
Call path from entry point to io.quarkus.arc.Arc.shutdown():
at io.quarkus.arc.Arc.shutdown(Arc.java:45)
at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:38)
at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:144)
at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:89)
at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:143)
at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:186)
at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
com.oracle.svm.core.util.UserError$UserException: No instances of java.io.FilePermission are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Detailed message:
Trace: object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object java.io.FilePermissionCollection
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object java.security.Permissions
object java.security.ProtectionDomain
object java.security.ProtectionDomain[]
object java.security.AccessControlContext
object java.util.concurrent.Executors$PrivilegedThreadFactory
object io.smallrye.faulttolerance.DefaultHystrixConcurrencyStrategy
object io.quarkus.arc.impl.InstanceHandleImpl
object java.lang.Object[]
object java.util.ArrayList
object java.util.Collections$SynchronizedRandomAccessList
object io.quarkus.arc.impl.CreationalContextImpl
object io.quarkus.arc.impl.InstanceImpl
object io.smallrye.faulttolerance.HystrixInitializer
object io.quarkus.arc.impl.ContextInstanceHandleImpl
object io.quarkus.arc.impl.LazyValue
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object io.quarkus.arc.impl.ComputingCache
object io.quarkus.arc.impl.ApplicationContext
object io.quarkus.arc.impl.ArcContainerImpl
object java.util.concurrent.atomic.AtomicReference
method io.quarkus.arc.Arc.shutdown()
Call path from entry point to io.quarkus.arc.Arc.shutdown():
at io.quarkus.arc.Arc.shutdown(Arc.java:45)
at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:38)
at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:144)
at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:89)
at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:143)
at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:186)
at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
at com.oracle.svm.core.util.UserError.abort(UserError.java:75)
at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:221)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:736)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:530)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:445)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: No instances of java.io.FilePermission are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
Detailed message:
Trace: object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object java.io.FilePermissionCollection
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object java.security.Permissions
object java.security.ProtectionDomain
object java.security.ProtectionDomain[]
object java.security.AccessControlContext
object java.util.concurrent.Executors$PrivilegedThreadFactory
object io.smallrye.faulttolerance.DefaultHystrixConcurrencyStrategy
object io.quarkus.arc.impl.InstanceHandleImpl
object java.lang.Object[]
object java.util.ArrayList
object java.util.Collections$SynchronizedRandomAccessList
object io.quarkus.arc.impl.CreationalContextImpl
object io.quarkus.arc.impl.InstanceImpl
object io.smallrye.faulttolerance.HystrixInitializer
object io.quarkus.arc.impl.ContextInstanceHandleImpl
object io.quarkus.arc.impl.LazyValue
object java.util.concurrent.ConcurrentHashMap$Node
object java.util.concurrent.ConcurrentHashMap$Node[]
object java.util.concurrent.ConcurrentHashMap
object io.quarkus.arc.impl.ComputingCache
object io.quarkus.arc.impl.ApplicationContext
object io.quarkus.arc.impl.ArcContainerImpl
object java.util.concurrent.atomic.AtomicReference
method io.quarkus.arc.Arc.shutdown()
Call path from entry point to io.quarkus.arc.Arc.shutdown():
at io.quarkus.arc.Arc.shutdown(Arc.java:45)
at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:38)
at com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:144)
at com.oracle.svm.core.jdk.RuntimeSupport.executeStartupHooks(RuntimeSupport.java:89)
at com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:143)
at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:186)
at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:126)
at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:733)
... 8 more
Error: Image build request failed with exit status 1
To Reproduce
Steps to reproduce the behavior from the master
branch:
- (Optional) Set the
JAVA_HOME
environment variable to a JDK 11 installation directory (OpenJDK 11 or GraalVM 19.3.0 JDK 11 edition). Add the JDK 11bin
directory to the path. - (Optional) Run
./mvnw clean install -Dmaven.test.skip=true
to build all the Quarkus sources with the JDK 11. - Run
./mvnw clean install --projects :quarkus-integration-test-main -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:19.3.0-java11
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Building a Native Executable - Quarkus
Mandrel's main goal is to provide a way to build native executables specifically designed to support Quarkus. Mandrel releases are built from a...
Read more >Chapter 4. Testing the native executable
Test the application running in the native mode to test the functionality of the native executable. Use @NativeImageTest annotation to build the native ......
Read more >unit testing - Quarkas - Unable to build - Caused by: java.lang ...
Please have a look at the documentation https://quarkus.io/guides/building-native-image#excluding-tests-when-running-as-a-native-executable ...
Read more >CONTRIBUTING.md - quarkusio/quarkus - Sourcegraph
Code reviews; Coding Guidelines; Continuous Integration; Tests and ... Don't forget to indicate your Quarkus, Java, Maven/Gradle and GraalVM version.
Read more >Skipping Tests with Maven - Baeldung
Learn how and when to skip tests with Maven. ... test/java/com/antmordel/skiptests/PowServiceTest.java:[11,9] not a statement [INFO] 1 error
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh then I wasn’t that silly 😃 Combining StartupEvent and a veto on the bean is exactly what I tried to do but I couldn’t find a way to make it work. Thanks for your quick answer!
Fix successfully tested locally, thanks for your help on this one @mkouba and @manovotn!
The
quarkus-integration-test-main
tests are now failing during execution because of the issue mentioned in #6127 which is unrelated with this one.