-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ClassCastException with RESTEasy reactive and a Jersey client #36024
Comments
/cc @FroMage (resteasy-reactive), @evanchooly (kotlin), @geoand (kotlin,resteasy-reactive), @stuartwdouglas (resteasy-reactive) |
You can't use the Jersey client with RESTEasy Reactive. You either use our implementatio of the JAX-RS client ( |
Reproducer for quarkusio/quarkus#36024
@geoand thank you for the quick confirmation. I already thought this would be the case, but it is not written in the documentation. If the Jersey part is something that I can change. The client library already exists (and is not something I can change) and is embedding Jersey jars as transitive dependencies. What are my options at quarkus level? An other check I could do is to verify if the client is really relying on Jersey, or if they are just using the JAX-RS api. In that case I might be able to exchange the lib implementing the JAX-RS API. This topic of the embedded java HTTP clients is really something that make me think a lot. I started this discussion: How to write a REST client library that is framework agnostic but never got any answer. |
It turns out that starting Quarkus 3.4.0 your use case works somewhat better (thank to #35558), but I'll reopen the issue and see if things can be improved further. Now WRT framework agnostic clients, I like what |
Reproducer for quarkusio/quarkus#36024
This is needed in order to avoid getting CCE when other implementations of Jakarta REST are on the classpath Closes: quarkusio#36024
#36025 fixes your issue. |
Don't use RuntimeDelegate in ResponseHandler
This is needed in order to avoid getting CCE when other implementations of Jakarta REST are on the classpath Closes: quarkusio#36024 (cherry picked from commit c636df6)
This is needed in order to avoid getting CCE when other implementations of Jakarta REST are on the classpath Closes: quarkusio#36024 (cherry picked from commit c636df6)
This is needed in order to avoid getting CCE when other implementations of Jakarta REST are on the classpath Closes: quarkusio#36024
Describe the bug
A quarkus app with endpoints using RESTEasy reactive using the
org.jboss.resteasy.reactive.ResponseStatus
annotation and a Jersey client is not working.Expected behavior
Can this be supported?
If yes, it would be nice if adding the Jersey client would not impact the quarkus part.
Actual behavior
When the endpoint is called:
How to Reproduce?
Step to reproduce:
resteasy-reactive
link on code.quarkus.io to create the project.@ResponseStatus(201)
on thehello
endpointorg.glassfish.jersey.core:jersey-common:3.1.3
dependency (in my real project I add a java REST client that has library as dependency)curl http://localhost:8080/hello
Output of
uname -a
orver
Output of
java -version
Quarkus version or git rev
3.3.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)Additional information
Reproducer project https://github.com/jmini/quarkus-experiments/tree/main/quarkus_issue36024
The text was updated successfully, but these errors were encountered: