-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
When multiple data sources are configured but only one is active, accessing the Database view of the DevUI (http://localhost:8080/q/dev-ui/io.quarkus.quarkus-agroal/database-view) throws the following exception:
2025-03-24 15:40:51,805 ERROR [io.qua.dev.run.jso.JsonRpcCodec] (executor-thread-2) Error in JsonRPC Call: io.quarkus.arc.InactiveBeanException: Bean is not active: SYNTHETIC bean [class=io.agroal.api.AgroalDataSource, id=CPdVxUSxlHEpEVxvHnYbwQCZep4]
Reason: Datasource 'mssql' was deactivated through configuration properties. To activate the datasource, set configuration property 'quarkus.datasource."mssql".active' to 'true' and configure datasource 'mssql'. Refer to https://quarkus.io/guides/datasource for guidance.
To avoid this exception while keeping the bean inactive:
- Configure all extensions consuming this bean as inactive as well, if they allow it, e.g. 'quarkus.someextension.active=false'
- Make sure that custom code only accesses this bean if it is active
at io.agroal.api.AgroalDataSource_CPdVxUSxlHEpEVxvHnYbwQCZep4_Synthetic_Bean.doCreate(Unknown Source)
at io.agroal.api.AgroalDataSource_CPdVxUSxlHEpEVxvHnYbwQCZep4_Synthetic_Bean.create(Unknown Source)
at io.agroal.api.AgroalDataSource_CPdVxUSxlHEpEVxvHnYbwQCZep4_Synthetic_Bean.create(Unknown Source)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:119)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:38)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:35)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:32)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.ComputingCacheContextInstances.computeIfAbsent(ComputingCacheContextInstances.java:19)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:35)
at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:23)
at io.agroal.api.AgroalDataSource_CPdVxUSxlHEpEVxvHnYbwQCZep4_Synthetic_ClientProxy.arc$delegate(Unknown Source)
at io.agroal.api.AgroalDataSource_CPdVxUSxlHEpEVxvHnYbwQCZep4_Synthetic_ClientProxy.arc_contextualInstance(Unknown Source)
at io.quarkus.arc.ClientProxy.unwrap(ClientProxy.java:52)
at io.quarkus.agroal.runtime.DataSources.getDataSource(DataSources.java:137)
at io.quarkus.agroal.runtime.dev.ui.DatabaseInspector.init(DatabaseInspector.java:76)
at io.quarkus.agroal.runtime.dev.ui.DatabaseInspector_Bean.doCreate(Unknown Source)
at io.quarkus.agroal.runtime.dev.ui.DatabaseInspector_Bean.create(Unknown Source)
at io.quarkus.agroal.runtime.dev.ui.DatabaseInspector_Bean.create(Unknown Source)
at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:119)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:38)
at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:35)
at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:32)
at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
at io.quarkus.arc.impl.ComputingCacheContextInstances.computeIfAbsent(ComputingCacheContextInstances.java:19)
at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:35)
at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:23)
at io.quarkus.agroal.runtime.dev.ui.DatabaseInspector_ClientProxy.arc$delegate(Unknown Source)
at io.quarkus.agroal.runtime.dev.ui.DatabaseInspector_ClientProxy.getDataSources(Unknown Source)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at io.quarkus.devui.runtime.comms.JsonRpcRouter.lambda$invoke$12(JsonRpcRouter.java:323)
at io.smallrye.mutiny.unchecked.UncheckedSupplier.lambda$toSupplier$0(UncheckedSupplier.java:41)
at io.smallrye.context.impl.wrappers.SlowContextualSupplier.get(SlowContextualSupplier.java:21)
at io.smallrye.mutiny.operators.uni.builders.UniCreateFromItemSupplier.subscribe(UniCreateFromItemSupplier.java:28)
at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:35)
at io.smallrye.mutiny.operators.uni.UniRunSubscribeOn.lambda$subscribe$0(UniRunSubscribeOn.java:27)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:639)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1583)
Expected behavior
Accessing http://localhost:8080/q/dev-ui/io.quarkus.quarkus-agroal/database-view just works.
Inactive data sources should be ignored.
Actual behavior
The page loads forever and the log shows the exception above.
How to Reproduce?
https://github.com/sbaeumlisberger/quarkus-databaseview-bug
Output of uname -a or ver
No response
Output of java -version
No response
Quarkus version or git rev
3.19.4
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response