[GitHub] [camel-quarkus] lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders
lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders URL: https://github.com/apache/camel-quarkus/pull/358#issuecomment-552638855 ``` [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v /home/jenkins/jenkins-slave/workspace/camel-quarkus-pr/integration-tests/core/test/target/camel-quarkus-integration-test-core-0.3.2-SNAPSHOT-native-image-source-jar:/project:z --user 910:910 --rm quay.io/quarkus/ubi-quarkus-native-image:19.2.1 -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -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 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar camel-quarkus-integration-test-core-0.3.2-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace camel-quarkus-integration-test-core-0.3.2-SNAPSHOT-runner [camel-quarkus-integration-test-core-0.3.2-SNAPSHOT-runner:40]classlist: 9,590.29 ms [camel-quarkus-integration-test-core-0.3.2-SNAPSHOT-runner:40](cap): 1,994.93 ms [camel-quarkus-integration-test-core-0.3.2-SNAPSHOT-runner:40]setup: 4,862.12 ms 21:20:20,130 INFO [org.jbo.threads] JBoss Threads version 3.0.0.Final [camel-quarkus-integration-test-core-0.3.2-SNAPSHOT-runner:40] analysis: 12,192.52 ms Error: Class initialization of io.quarkus.runner.ApplicationImpl failed. Use the option --initialize-at-run-time=io.quarkus.runner.ApplicationImpl to explicitly request delayed initialization of this class. Detailed message: com.oracle.svm.core.util.UserError$UserException: Class initialization of io.quarkus.runner.ApplicationImpl failed. Use the option --initialize-at-run-time=io.quarkus.runner.ApplicationImpl to explicitly request delayed initialization of this class. Detailed message: at com.oracle.svm.core.util.UserError.abort(UserError.java:75) at com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:223) at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:737) 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) Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Class initialization of io.quarkus.runner.ApplicationImpl failed. Use the option --initialize-at-run-time=io.quarkus.runner.ApplicationImpl to explicitly request delayed initialization of this class. Detailed message: at com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:130) at com.oracle.graal.pointsto.BigBang.finish(BigBang.java:565) at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:688) ... 7 more Caused by: java.lang.ExceptionInInitializerError at sun.misc.Unsafe.ensureClassInitialized(Native Method) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.ensureClassInitialized(ConfigurableClassInitialization.java:153) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:557) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.computeInitKindAndMaybeInitializeClass(ConfigurableClassInitialization.java:116) at com.oracle.svm.hosted.classinitialization.ConfigurableClassInitialization.maybeInitializeHosted(ConfigurableClassInitialization.java:144) at com.oracle.svm.hosted.SVMHost.registerType(SVMHost.java:190) at com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:262) at com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:203) at com.oracle.graal.pointsto.infrastructure.WrappedConstantPool.lookupType(WrappedConstantPool.java:155) at
[GitHub] [camel-quarkus] lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders
lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders URL: https://github.com/apache/camel-quarkus/pull/358#issuecomment-552614034 ok to test 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders
lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders URL: https://github.com/apache/camel-quarkus/pull/358#issuecomment-552005268 This is IMHO bad as we are de optimizing the app 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders
lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders URL: https://github.com/apache/camel-quarkus/pull/358#issuecomment-552000542 does this means that route builder classes are now instantiated at runtime only ? 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders
lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders URL: https://github.com/apache/camel-quarkus/pull/358#issuecomment-551896685 I think we really need to get rid of the double discovery as having two identical builder is confusing and inefficient 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders
lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders URL: https://github.com/apache/camel-quarkus/pull/358#issuecomment-548433118 > > if people need to use MicroProfile / CDI injection then they could simply annotate the route with ApplicationScope > > Maybe I am missing something trivial, but adding `@ApplicationScoped` to a class extending `RouteBuilder` does not make `@Inject` in that same class work. The itest in this PR implements exactly that scenario and I was not able to make it work without the proposed fix. Or you mean something else by "annotate the route"? > I think it does not work because camel discovers it on the classpath and load it on ts own so it bypass ArC. > > still need to fix the problem of having the same route discovered at runtime and at build time > > Good point, let me add a test 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [camel-quarkus] lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders
lburgazzoli commented on issue #358: Fix #136 @ConfigProperty and @Inject do not work in RouteBuilders URL: https://github.com/apache/camel-quarkus/pull/358#issuecomment-548416614 I'm wonder if it worth doing that as there's basic dependency injection in camel that works out of the box and if people need to use MicroProfile / CDI injection then they could simply annotate the route with ApplicationScope or any similar annotation (we still need to fix the problem of having the same route discovered at runtime and at build time). 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: us...@infra.apache.org With regards, Apache Git Services