You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/06/06 08:32:15 UTC
[GitHub] [camel-quarkus] jamesnetherton opened a new issue, #3838: [Quarkus 2.10.0] Unable to build native image with XML JAXB extension
jamesnetherton opened a new issue, #3838:
URL: https://github.com/apache/camel-quarkus/issues/3838
Whenever `camel-quarkus-xml-jaxb` is on the classpath it is not possible to successfully produce a native application.
```
Error: java.util.concurrent.ExecutionException: java.lang.NullPointerException: receiver is null
com.oracle.graal.pointsto.util.AnalysisError: java.util.concurrent.ExecutionException: java.lang.NullPointerException: receiver is null
at com.oracle.graal.pointsto.util.AnalysisError.shouldNotReachHere(AnalysisError.java:172)
at com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:66)
at com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$postTask$9(ImageHeapScanner.java:611)
at com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:193)
at com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:177)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426)
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:183)
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException: receiver is null
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:64)
... 9 more
Caused by: java.lang.NullPointerException: receiver is null
at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotConstantReflectionProvider.readFieldValue(HotSpotConstantReflectionProvider.java:175)
at com.oracle.svm.core.meta.ReadableJavaField.readFieldValue(ReadableJavaField.java:40)
at com.oracle.svm.hosted.substitute.ComputedValueField.readValue(ComputedValueField.java:312)
at com.oracle.svm.hosted.ameta.AnalysisConstantReflectionProvider.readHostedFieldValue(AnalysisConstantReflectionProvider.java:128)
at com.oracle.svm.hosted.heap.SVMImageHeapScanner.readHostedFieldValue(SVMImageHeapScanner.java:121)
at com.oracle.graal.pointsto.heap.ImageHeapScanner.createImageHeapObject(ImageHeapScanner.java:265)
at com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$getOrCreateConstantReachableTask$2(ImageHeapScanner.java:195)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:63)
at com.oracle.graal.pointsto.heap.ImageHeapScanner.getOrCreateConstantReachableTask(ImageHeapScanner.java:207)
at com.oracle.svm.hosted.heap.SVMImageHeapScanner.getOrCreateConstantReachableTask(SVMImageHeapScanner.java:94)
at com.oracle.graal.pointsto.heap.ImageHeapScanner.markConstantReachable(ImageHeapScanner.java:171)
at com.oracle.graal.pointsto.heap.ImageHeapScanner.onFieldValueReachable(ImageHeapScanner.java:333)
at com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$createImageHeapObject$3(ImageHeapScanner.java:272)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.oracle.graal.pointsto.util.AnalysisFuture.ensureDone(AnalysisFuture.java:63)
```
I think it's related to https://github.com/quarkusio/quarkus/commit/3ff5a163633af6fc076f7ddf700a3c7c285f7b44 and specifically this code:
```
@Alias
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.FromAlias)
private Map<Class<? extends Annotation>, Map<Package, Annotation>> packageCache = new HashMap<>();
```
Similar to https://github.com/quarkusio/quarkus/issues/3300#issuecomment-653002628, I think [creation](https://github.com/apache/camel-quarkus/blob/main/extensions-core/xml-jaxb/runtime/src/main/java/org/apache/camel/quarkus/component/xml/jaxb/XmlJaxbRecorder.java#L37) of the JAXBContext in our `xml-jaxb` extension messes up the `RecomputeFieldValue`. It seems to work fine if it's changed to:
```
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.NewInstance, declClass = HashMap.class)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton commented on issue #3838: [Quarkus 2.10.0] Unable to build native image with XML JAXB extension
Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #3838:
URL: https://github.com/apache/camel-quarkus/issues/3838#issuecomment-1149606036
Looks like the fix I sent to Quarkus has got things [working](https://github.com/apache/camel-quarkus/actions/runs/2458727111) again. So I'll close this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton closed issue #3838: [Quarkus 2.10.0] Unable to build native image with XML JAXB extension
Posted by GitBox <gi...@apache.org>.
jamesnetherton closed issue #3838: [Quarkus 2.10.0] Unable to build native image with XML JAXB extension
URL: https://github.com/apache/camel-quarkus/issues/3838
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org