Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Quarkus 2.14.0] PgeventTest application fails to start #4114

Closed
jamesnetherton opened this issue Sep 21, 2022 · 5 comments
Closed

[Quarkus 2.14.0] PgeventTest application fails to start #4114

jamesnetherton opened this issue Sep 21, 2022 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@jamesnetherton
Copy link
Contributor

There's an exception being thrown from the Agroal extension:

Caused by: java.lang.RuntimeException: Failed to start quarkus
        at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.runner.bootstrap.StartupActionImpl.run(StartupActionImpl.java:237)
        at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:262)
        at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:681)
        at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:729)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
        at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:395)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:211)
        at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
        at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
        ... 36 more
Caused by: java.lang.IllegalArgumentException: Annotation is not a registered qualifier: interface io.quarkus.agroal.runtime.JdbcDriver
        at io.quarkus.arc.impl.Qualifiers.verifyQualifier(Qualifiers.java:151)
        at io.quarkus.arc.impl.Qualifiers.verify(Qualifiers.java:58)
        at io.quarkus.arc.impl.ArcContainerImpl.getBean(ArcContainerImpl.java:450)
        at io.quarkus.arc.impl.ArcContainerImpl.instanceHandle(ArcContainerImpl.java:413)
        at io.quarkus.arc.impl.ArcContainerImpl.instance(ArcContainerImpl.java:206)
        at io.quarkus.agroal.runtime.DataSources.doCreateDataSource(DataSources.java:207)
        at io.quarkus.agroal.runtime.DataSources$1.apply(DataSources.java:125)
        at io.quarkus.agroal.runtime.DataSources$1.apply(DataSources.java:122)
        at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
        at io.quarkus.agroal.runtime.DataSources.getDataSource(DataSources.java:122)
        at io.quarkus.agroal.runtime.DataSources.fromName(DataSources.java:118)
        at io.quarkus.agroal.runtime.AgroalRecorder.agroalDataSourceSupplier(AgroalRecorder.java:23)
        at io.quarkus.deployment.steps.AgroalProcessor$generateDataSourceBeans109901991.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.AgroalProcessor$generateDataSourceBeans109901991.deploy(Unknown Source)
        ... 52 more
@jamesnetherton jamesnetherton added the bug Something isn't working label Sep 21, 2022
@jamesnetherton
Copy link
Contributor Author

@mkouba
Copy link
Contributor

mkouba commented Sep 21, 2022

Yes, we added a few more checks to comply with the spec and it seems that the JdbcDriver is not registered as a CDI qualifier but used in the programmatic look here: https://github.com/quarkusio/quarkus/blob/main/extensions/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/DataSources.java#L207.

It's possible that there is no test for this qualifier at all.

CC @gsmet

@mkouba
Copy link
Contributor

mkouba commented Sep 21, 2022

It should be enough to produce an AdditionalBeanBuildItem for the JdbcDriver qualifier somewhere here. Also these lines are completely useless: https://github.com/quarkusio/quarkus/blob/main/extensions/agroal/deployment/src/main/java/io/quarkus/agroal/deployment/AgroalProcessor.java#L212-L213 because the AgroalPoolInterceptor is just an interface.

@gsmet
Copy link
Contributor

gsmet commented Sep 21, 2022

I created quarkusio/quarkus#28121 .

Not sure why we don't see this issue in our tests.

@jamesnetherton
Copy link
Contributor Author

I verified that quarkusio/quarkus#28121 fixes the problem, so I'll close this one.

@zbendhiba zbendhiba added this to the 2.14 milestone Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants