-
Notifications
You must be signed in to change notification settings - Fork 20
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 is thrown if Jersey is used. #14
Comments
@lordofthejars This code should be run only in @RunAsClient mode because rest client is rest created only using RestEasy. Although John Ament has created pure JAX-RS impl of the extension. But allow me to look at it later today. |
Take your time don't worry. BTW The test is already run with @RunAsClient annotation. If you need I will push the code to github, there is no problem about that. |
@lordofthejars such testcase would be very welcome. |
This afternoon (20:00 CET) I will push the code and send you the link. 2014/1/8 Bernard Labno [email protected]
+----------------------------------------------------------+ |
Pushed at https://github.com/lordofthejars/chapter-9/blob/arquillian-rest-extension/src/it/java/com/wakaleo/bddinaction/chapter9/flightstatus/WhenIWantToKnowFlightsByDeparture.java on arquillian-rest-extension branch. |
Hello. I am facing same problem. I want to user arquillian persistence extension with webservices deployed in glassfish, so the implementation is Jersey. Did you solve it? I am checking the code in te repo. Thanks. |
I have git a running example with apache TomEE which used apache cxf and I remember doing some hacking let me find the example and I send you the link Enviat des del meu iPhone El 16/05/2014, a les 11.33, juancasta [email protected] va escriure:
|
Thanks! |
I think that the problem is embedded mode for Tomcat. As I understand it, Tomcat uses same classpath as tests, so in order for Tomcat to run with Jersey, it needs to be on classpath, but this way, dependencies of RestEasy Client (used by our extension) get substituted by jersey. Solution 1 (not perfect): avoid embedded mode and run in managed mode. |
I've created prototype of jersey impl of our extension:
|
@lordofthejars Could you have a look at getCustomerById test? blabno@03a6959#diff-c84ee3844f0ecbbefcbecf1202a011f3R113 If I run it in tomcat-embedded profile (Jersey on server side). I'm getting 404. |
In remote it works right? Enviat des del meu iPhone El 19/05/2014, a les 14.45, Bernard Labno [email protected] va escriure:
|
I haven't tested it with remote tomcat just managed as7 and embedded tomcat.
|
If you Can try with managed/remote tomcat if it works it is a dependencies El dilluns, 19 maig de 2014, Bernard Labno [email protected] va
Enviat amb Gmail Mobile |
Well, actually it does not work. |
Ok then try to do next: https://github.com/lordofthejars/bjugbank/blob/master/pom.xml#L173 I have used for TomEE embedded but probably something similar to Tomcat 2014-05-20 9:03 GMT+02:00 Bernard Labno [email protected]:
+----------------------------------------------------------+ |
@lordofthejars I have commited Tomcat managed profile, but the problem with getCustomerById remains. |
What a stupid issue!
|
Ou yes sorry, I remembered now that annotations should go into interface Cool!!! 2014-05-20 10:51 GMT+02:00 Bernard Labno [email protected]:
+----------------------------------------------------------+ |
I am using Arquillian-Rest-Extension to test REST services. The server part is implemented using Jersey (not RestEasy). The problem is that when query params are set a classcastexception is thrown.
The problem is at line 287 where there are a clone and a cast:
copy
should be casted not to the interfaceUriBuilder
but toResteasyUriBuilder
becauseclientQueryParam
is a method from that class. Of course it can be very solutions to that problem:replaceQueryParam
which is a method fromUriBuilder
interface.WDYT?
The text was updated successfully, but these errors were encountered: