Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Generted client proxy is not working with RESTEasy #438

Open
amreladawy opened this issue May 6, 2020 · 2 comments
Open

Generted client proxy is not working with RESTEasy #438

amreladawy opened this issue May 6, 2020 · 2 comments

Comments

@amreladawy
Copy link

amreladawy commented May 6, 2020

Using RestEasy with the generated Rest client is failing with the following error.

ClassCastException : class org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine$2 cannot be cast to class MyResponse

The reason is that the generated MyReponse inherits ResponseDelegate which inherits javax.ws.rs.core.Response. RESTEasy will return ManualClosingApacheHttpClient43Engine and it fails casting to MyReponse class.

How to get the generated code to work using RESTEasy?

@jpbelang
Copy link
Contributor

jpbelang commented May 9, 2020

Looking into it.

But, from the top of my head, does RestEasy implement jaxrs ?

@amreladawy
Copy link
Author

Yes, it does. It is like Jersey. Actually when I switched to Jersey, the deserialisation is failing also, but I am going to list this in another issue.

Here is the StackOverflow question. https://stackoverflow.com/questions/61431765/classcastexception-class-org-jboss-resteasy-client-jaxrs-engines-manualclosing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants