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 2019/11/25 08:57:12 UTC

[GitHub] [camel-quarkus] bframke opened a new issue #467: Problem: Classes that should be initialized at run time got initialized during image building

bframke opened a new issue #467: Problem: Classes that should be initialized at run time got initialized during image building
URL: https://github.com/apache/camel-quarkus/issues/467
 
 
   What we are trying to do is sending Messages between IBM MQ and ActiveMQ Artemis. Therefore we use an selfmade Quarkus IBM MQ Extension and a selfmade Camel-JMS Extension. When we started the project there was no JMS support for Camel-Quarkus.
   
   We currently face a problem with our Camel Extension. We tried to update it to a newer version to Camel 0.4.0, Graal 19.3.0 and Quarkus 1.0.0.CR2. But we receive this error message upon building a native image:
   ```Error: Classes that should be initialized at run time got initialized during image building:
    io.netty.buffer.PooledByteBufAllocator the class was requested to be initialized at build time (from the command line and Quarkus).  To see why io.netty.buffer.PooledByteBufAllocator got initialized use -H:+TraceClassInitialization
   com.oracle.svm.core.util.UserError$UserException: Classes that should be initialized at run time got initialized during image building:
    io.netty.buffer.PooledByteBufAllocator the class was requested to be initialized at build time (from the command line and Quarkus).  To see why io.netty.buffer.PooledByteBufAllocator got initialized use -H:+TraceClassInitialization
           at com.oracle.svm.core.util.UserError.abort(UserError.java:65)
           at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.checkDelayedInitialization(ConfigurableClassInitialization.java:494)
           at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.duringAnalysis(ClassInitializationFeature.java:188)
           at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$8(NativeImageGenerator.java:711)
           at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:63)
           at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:711)
           at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:526)
           at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:444)
           at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
           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)
   Error: Image build request failed with exit status 1
   ```
   
   I already tried to use the `--initialize-at-run-time` and `--initialize-at-build-time` parameters. The first throws the same message and the second this:
   ```Error: Incompatible change of initialization policy for io.netty.buffer.PooledByteBufAllocator: trying to change BUILD_TIME from the command line to RUN_TIME from the command line
   com.oracle.svm.core.util.UserError$UserException: Incompatible change of initialization policy for io.netty.buffer.PooledByteBufAllocator: trying to change BUILD_TIME from the command line to RUN_TIME from the command line
           at com.oracle.svm.core.util.UserError.abort(UserError.java:65)
           at com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:96)
           at com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:107)
           at com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:107)
           at com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:107)
           at com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insertRec(ClassInitializationConfiguration.java:107)
           at com.oracle.svm.hosted.classinitialization.ClassInitializationConfiguration.insert(ClassInitializationConfiguration.java:63)
           at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.initializeAtRunTime(ConfigurableClassInitialization.java:205)
           at com.oracle.svm.hosted.classinitialization.InitKind.lambda$stringConsumer$0(InitKind.java:69)
           at com.oracle.svm.hosted.classinitialization.ClassInitializationFeature.processClassInitializationOptions(ClassInitializationFeature.java:146)
           at com.oracle.svm.hosted.HostedConfiguration.setDefaultIfEmpty(HostedConfiguration.java:71)
           at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:819)
           at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:524)
           at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:444)
           at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
           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)
   Error: Image build request failed with exit status 1
   ```
   
   I also tried to add this class via rerun and the Extension-Loader from Quarkus which also runs into an error in this case. Is there anyway for Camel to help or is the netty hub better suited for that?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services