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

NullPointerException in Resteasy Reactive Client due to no Configuration #23949

Closed
chonton opened this issue Feb 24, 2022 · 2 comments · Fixed by #23996
Closed

NullPointerException in Resteasy Reactive Client due to no Configuration #23949

chonton opened this issue Feb 24, 2022 · 2 comments · Fixed by #23996
Labels
area/resteasy-reactive kind/bug Something isn't working
Milestone

Comments

@chonton
Copy link
Contributor

chonton commented Feb 24, 2022

Describe the bug

When using classic jaxrs ClientBuilder with implementation from Resteasy Reactive Client jars, the configuration is not initialized.

Expected behavior

ClientRequestFilter(s) successfully registered with classic ClientBuilder

Actual behavior

NullPointerException thrown from org.jboss.resteasy.reactive.client.impl.ClientBuilderImpl, line 313

How to Reproduce?

With dependencies:

io.quarkus.resteasy.reactive:resteasy-reactive-common:jar:2.7.1.Final
org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec:jar:2.0.1.Final

Use the following code:

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.ClientRequestFilter;

public static void main(String args[]) {
    ClientBuilder clientBuilder = ClientBuilder.newBuilder();
    for (ClientRequestFilter filter : filters) {
      // following line has NPE
      clientBuilder.register(filter);
    }
}

Output of uname -a or ver

Darwin C02YD0B0JG5J.corp.proofpoint.com 20.6.0 Darwin Kernel Version 20.6.0: Wed Jan 12 22:22:42 PST 2022; root:xnu-7195.141.19~2/RELEASE_X86_64 x86_64

Output of java -version

openjdk version "11.0.12" 2021-07-20

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.7.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)

Additional information

No response

@chonton chonton added the kind/bug Something isn't working label Feb 24, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 24, 2022

/cc @FroMage, @geoand, @stuartwdouglas

@geoand
Copy link
Contributor

geoand commented Feb 25, 2022

Does the same thing happen if you include quarkus-jaxrs-client-reactive and run your test as Quarkus application instead of a vanilla main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/resteasy-reactive kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants