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
Combination of rest-client and smallrye-opentracing ends with NPE when running generated tests
Using Quarkus 2.6.1.Final, test is passing when smallrye-opentracing is commented out.
Seems this is not a new regression, was able to reproduce on Quarkus 2.2.5.Final.
[INFO] Running io.quarkus.qe.MyRemoteServiceTest
2022-01-04 09:55:38,396 WARN [io.qua.arc.impl] (main)
================================================================================
CDI: programmatic lookup problem detected
-----------------------------------------
At least one bean matched the required type and qualifiers but was marked as unused and removed during build
Stack frame: io.quarkus.resteasy.common.runtime.QuarkusConstructorInjector.construct(QuarkusConstructorInjector.java:35)
Required type: class io.quarkus.smallrye.opentracing.runtime.QuarkusSmallRyeTracingDynamicFeature
Required qualifiers: [@javax.enterprise.inject.Default()]
Removed beans:
- CLASS bean [types=[class io.quarkus.smallrye.opentracing.runtime.QuarkusSmallRyeTracingDynamicFeature, interface javax.ws.rs.container.DynamicFeature], qualifiers=null]
Solutions:
- Application developers can eliminate false positives via the @Unremovable annotation
- Extensions can eliminate false positives via build items, e.g. using the UnremovableBeanBuildItem
- See also https://quarkus.io/guides/cdi-reference#remove_unused_beans
- Enable the DEBUG log level to see the full stack trace
================================================================================
2022-01-04 09:55:38,449 INFO [io.quarkus] (main) Quarkus 2.6.1.Final on JVM started in 1.081s.
2022-01-04 09:55:38,449 INFO [io.quarkus] (main) Profile test activated.
2022-01-04 09:55:38,450 INFO [io.quarkus] (main) Installed features: [cdi, jaeger, rest-client, rest-client-jackson, smallrye-opentracing]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.76 s <<< FAILURE! - in io.quarkus.qe.MyRemoteServiceTest
[ERROR] io.quarkus.qe.MyRemoteServiceTest.testExtensionsRestClientEndpoint Time elapsed: 0.004 s <<< ERROR!
org.junit.jupiter.api.extension.TestInstantiationException: Failed to create test instance
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.RuntimeException: Error injecting io.quarkus.qe.MyRemoteService io.quarkus.qe.MyRemoteServiceTest.myRemoteService
Caused by: java.lang.NullPointerException
2022-01-04 09:55:38,652 INFO [io.quarkus] (main) Quarkus stopped in 0.008s
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] MyRemoteServiceTest.testExtensionsRestClientEndpoint » TestInstantiation Faile...
[INFO]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
This is needed because without this change, applications that only
include the rest-client without including the server component,
result in the providers not being registered as unremovable beans.
Fixes: quarkusio#22605
This is needed because without this change, applications that only
include the rest-client without including the server component,
result in the providers not being registered as unremovable beans.
Fixes: quarkusio#22605
(cherry picked from commit 1384373)
Describe the bug
Combination of rest-client and smallrye-opentracing ends with NPE when running generated tests
Using Quarkus 2.6.1.Final, test is passing when
smallrye-opentracing
is commented out.Seems this is not a new regression, was able to reproduce on Quarkus 2.2.5.Final.
Expected behavior
mvn clean verify
passesActual behavior
mvn clean verify
execution fails with NPEHow to Reproduce?
Generate the project:
mvn -Dquarkus.platform.artifact-id=quarkus-bom io.quarkus:quarkus-maven-plugin:2.6.1.Final:create -DprojectGroupId=io.quarkus.qe -DprojectArtifactId=rest-client-smallrye-opentracing -DprojectVersion=1.0.0-SNAPSHOT -DplatformGroupId=io.quarkus -DplatformArtifactId=quarkus-bom -Dextensions=rest-client,smallrye-opentracing
Run it:
mvn clean verify -f rest-client-smallrye-opentracing
Output of
uname -a
orver
No response
Output of
java -version
Java 17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.1.Final
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: