Native config of dependent jar is not accessible
See original GitHub issueA bug block the Mongo refactoring for cluster #4529. Mongo Operations. Java in panache Mongo module try to load config quarkus.mongodb.database. But it fail on native. Whereas it is in application.properties and work well in regular mode. If I add application.properties to NativeImageResourceBuildItem it work but it is not an expected behavior. BTW, it is odd to use database property because, it can be inside connection string too. Best is too defined and use it only on Mongodb module and only select database if specified on panash entity.
Ps you can see full stack on azure last build of #3343
ON mongodb panache integration test:
Stack trace:
ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-worker-thread-0) HTTP Request to /persons/repository failed, error id: b503008a-2200-4948-8808-80ba7af55379-1: org.jboss.resteasy.spi.UnhandledException: java.util.NoSuchElementException: Property quarkus.mongodb.database not found
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:106)
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:372)
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:209)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:252)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:153)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:363)
at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:156)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:238)
at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:108)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatchRequestContext(VertxRequestHandler.java:83)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.lambda$handle$0(VertxRequestHandler.java:70)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
Caused by: java.util.NoSuchElementException: Property quarkus.mongodb.database not found
at io.smallrye.config.SmallRyeConfig.propertyNotFound(SmallRyeConfig.java:221)
at io.smallrye.config.SmallRyeConfig.getValue(SmallRyeConfig.java:112)
at io.quarkus.mongodb.panache.runtime.MongoOperations.mongoDatabase(MongoOperations.java:273)
at io.quarkus.mongodb.panache.runtime.MongoOperations.mongoCollection(MongoOperations.java:177)
at io.quarkus.mongodb.panache.runtime.MongoOperations.findAll(MongoOperations.java:445)
at io.quarkus.mongodb.panache.runtime.MongoOperations.listAll(MongoOperations.java:469)
at io.quarkus.it.mongodb.panache.person.PersonRepository.listAll(PersonRepository.java)
at io.quarkus.it.mongodb.panache.person.PersonRepository_ClientProxy.listAll(PersonRepository_ClientProxy.zig:1599)
at io.quarkus.it.mongodb.panache.person.PersonRepositoryResource.getPersons(PersonRepositoryResource.java:26)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:151)
at org.jboss.resteasy.core.MethodInjectorImpl.lambda$invoke$3(MethodInjectorImpl.java:122)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:616)
at java.util.concurrent.CompletableFuture.uniApplyStage(CompletableFuture.java:628)
at java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:1996)
at java.util.concurrent.CompletableFuture.thenApply(CompletableFuture.java:110)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:122)
at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:594)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:468)
at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:421)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:363)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:423)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:391)
at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invoke$1(ResourceMethodInvoker.java:365)
at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995)
at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2137)
at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:110)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:365)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:477)`
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
React Native - Run Android - Could not find common.jar ...
A problem occurred configuring project ':react-native-device-info'. > Could not find common.jar (android.arch.core:common:1.0.0). Searched in ...
Read more >Newcomers » Import not accessible - Eclipse Community Forums
I am finding with nearly any package I am importing I am always coming across the "X is not accessible" even when going...
Read more >Module dependencies | IntelliJ IDEA Documentation - JetBrains
Modules can depend on SDKs, JAR files (libraries) or other modules within a project. When you compile or run your code, the list...
Read more >Building applications with Maven - Quarkus
If the runner suffix is not desired, it can be disabled by setting quarkus.package.add-runner-suffix configuration option to false , in which case the...
Read more >Add build dependencies - Android Developers
This configuration is deprecated (it's available in AGP 1.0-4.2). provided, Gradle adds the dependency to the compile classpath only (that is, it is...
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
@loicmathieu @geoand @dmlloyd great news, with 5387, I have succeed to build the module and run integration test. command run ./mvnw clean install -Pnative
@geoand sadly still failing with the change.