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

native-image failing on io.helidon.microprofile.weld.ExecutorServices #2315

Closed
barchetta opened this issue Sep 2, 2020 · 3 comments · Fixed by #2317
Closed

native-image failing on io.helidon.microprofile.weld.ExecutorServices #2315

barchetta opened this issue Sep 2, 2020 · 3 comments · Fixed by #2317
Assignees
Labels
2.x Issues for 2.x version branch bug Something isn't working MP native-image P1
Milestone

Comments

@barchetta
Copy link
Member

Environment Details

  • Helidon Version: 2.0.2-SNAPSHOT
  • Helidon MP

Problem Description

I'm getting an exception building the native-image for the MP quickstart:

[INFO] 2020.09.02 01:15:12 WARNING ServiceLoader Thread[ForkJoinPool-2-worker-11,5,main]: Could not load service class io.helidon.microprofile.weld.ExecutorServices
[INFO] 2020.09.02 01:15:12 WARNING ServiceLoader Thread[ForkJoinPool-2-worker-11,5,main]: Could not load service class io.helidon.microprofile.weld.ExecutorServices
[INFO] 2020.09.02 01:15:12 WARNING ServiceLoader Thread[ForkJoinPool-2-worker-11,5,main]: Could not load service class io.helidon.microprofile.weld.ExecutorServices
[INFO] 2020.09.02 01:15:12 INFO org.jboss.weld.Bootstrap Thread[ForkJoinPool-2-worker-11,5,main]: WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
[INFO] 2020.09.02 01:15:12 INFO org.jboss.weld.Event Thread[ForkJoinPool-2-worker-11,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jersey.ext.cdi1x.internal.ProcessAllAnnotatedTypes.processAnnotatedType(@Observes ProcessAnnotatedType<?>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[INFO] 2020.09.02 01:15:12 INFO org.jboss.weld.Event Thread[ForkJoinPool-2-worker-11,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] private io.helidon.microprofile.openapi.OpenApiCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<X>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
[INFO] 2020.09.02 01:15:26 WARNING com.netflix.config.sources.URLConfigurationSource Thread[ForkJoinPool-2-worker-23,5,main]: No URLs will be polled as dynamic configuration sources.
[INFO] 2020.09.02 01:15:26 INFO com.netflix.config.sources.URLConfigurationSource Thread[ForkJoinPool-2-worker-23,5,main]: To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
[INFO] 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.
[INFO] 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.
[INFO] 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.
[INFO] 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.ConcurrentSequencedCircularArrayQueue. 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.
[INFO] 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.ConcurrentSequencedCircularArrayQueue. 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.
[INFO] [helidon-quickstart-mp:10965]     analysis:  25,338.59 ms,  4.41 GB
[WARNING] Error: Could not find registered service implementation class `io.helidon.microprofile.weld.ExecutorServices` for service `org.jboss.weld.bootstrap.api.Service`
[WARNING] com.oracle.svm.core.util.UserError$UserException: Could not find registered service implementation class `io.helidon.microprofile.weld.ExecutorServices` for service `org.jboss.weld.bootstrap.api.Service`
[WARNING] 	at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
[WARNING] 	at com.oracle.svm.hosted.ServiceLoaderFeature.handleType(ServiceLoaderFeature.java:203)
[WARNING] 	at com.oracle.svm.hosted.ServiceLoaderFeature.duringAnalysis(ServiceLoaderFeature.java:112)
[WARNING] 	at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$8(NativeImageGenerator.java:720)
[WARNING] 	at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:70)
[WARNING] 	at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:720)
[WARNING] 	at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:538)
[WARNING] 	at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:451)
[WARNING] 	at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
[WARNING] 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[WARNING] 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[WARNING] 	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[WARNING] 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[WARNING] 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
[WARNING] Error: Image build request failed with exit status 1

Steps to reproduce

Pull the latest master and build it
cd examples/quickstarts/helidon-quickstart-mp
mvn -Dversion.plugin.helidon=2.1.1 clean package -Pnative-image
@barchetta barchetta added bug Something isn't working MP P1 2.x Issues for 2.x version branch native-image labels Sep 2, 2020
@barchetta barchetta added this to the 2.0.2 milestone Sep 2, 2020
@barchetta
Copy link
Member Author

On a hunch I'm casting the evil eye at #2269

@ljnelson
Copy link
Member

ljnelson commented Sep 2, 2020

See #2316

@tomas-langer
Copy link
Member

tomas-langer commented Sep 2, 2020

The problem is that the service file is wrong - it references non-existing service implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch bug Something isn't working MP native-image P1
Projects
Archived in project
3 participants