You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the resteasy-reactive extension, if we exclude providers using build time conditions, it doesn't check anymore if the class has been annotated with @Provider so Arc tries instantiate them all, even those that should be instantiated by a DynamicFeature which leads to errors of type javax.enterprise.inject.UnsatisfiedResolutionException.
Expected behavior
When providers are excluded thanks to build time conditions, Arc should only instantiate providers annotated with @Provider
Actual behavior
When providers are excluded thanks to build time conditions, Arc instantiates all, even those that should be instantiated by a DynamicFeature
How to Reproduce?
Steps to reproduce
Add a provider annotated with a build time condition to enable the class filtering by excluded classes
Add a DynamicFeature that instantiate a filter with parameters that Arc cannot find by itself
Result:
You get an error of type:
java.lang.RuntimeException:
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type java.lang.String and qualifiers [@Default]
- java member: io.quarkus.resteasy.reactive.server.test.simple.BuildProfileTest$ResponseFilter7#<init>()
- declared on CLASS bean [types=[io.quarkus.resteasy.reactive.server.test.simple.BuildProfileTest$ResponseFilter7, java.lang.Object, javax.ws.rs.container.ContainerResponseFilter], qualifiers=[@Default, @Any], target=io.quarkus.resteasy.reactive.server.test.simple.BuildProfileTest$ResponseFilter7]
The following beans match by type, but none have matching qualifiers:
- Bean [class=java.lang.String, qualifiers=[@ConfigProperty, @Any]]
at io.quarkus.arc.processor.BeanDeployment.processErrors(BeanDeployment.java:1149)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:266)
at io.quarkus.arc.processor.BeanProcessor.initialize(BeanProcessor.java:129)
at io.quarkus.arc.deployment.ArcProcessor.validate(ArcProcessor.java:418)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at java.base/java.lang.Thread.run(Thread.java:834)
at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type java.lang.String and qualifiers [@Default]
- java member: io.quarkus.resteasy.reactive.server.test.simple.BuildProfileTest$ResponseFilter7#<init>()
- declared on CLASS bean [types=[io.quarkus.resteasy.reactive.server.test.simple.BuildProfileTest$ResponseFilter7, java.lang.Object, javax.ws.rs.container.ContainerResponseFilter], qualifiers=[@Default, @Any], target=io.quarkus.resteasy.reactive.server.test.simple.BuildProfileTest$ResponseFilter7]
The following beans match by type, but none have matching qualifiers:
- Bean [class=java.lang.String, qualifiers=[@ConfigProperty, @Any]]
at io.quarkus.arc.processor.Beans.resolveInjectionPoint(Beans.java:567)
at io.quarkus.arc.processor.BeanInfo.init(BeanInfo.java:470)
at io.quarkus.arc.processor.BeanDeployment.init(BeanDeployment.java:254)
... 13 more
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
In the resteasy-reactive extension, if we exclude providers using build time conditions, it doesn't check anymore if the class has been annotated with
@Provider
so Arc tries instantiate them all, even those that should be instantiated by aDynamicFeature
which leads to errors of typejavax.enterprise.inject.UnsatisfiedResolutionException
.Expected behavior
When providers are excluded thanks to build time conditions, Arc should only instantiate providers annotated with
@Provider
Actual behavior
When providers are excluded thanks to build time conditions, Arc instantiates all, even those that should be instantiated by a
DynamicFeature
How to Reproduce?
Steps to reproduce
DynamicFeature
that instantiate a filter with parameters that Arc cannot find by itselfResult:
You get an error of type:
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: