This is the error I get when running my code on Websphere.
NoSuchMethodError: javax/ws/rs/core/Response.readEntity(Ljava/lang/Class;)Ljava/lang/Object;
I don't get the same error when running on Tomcat
The code is (its the last line that throws the exception)
WebClient client = WebClient.create("http://x.x.x.:8080/webp/services/RS/webp/pt/" );
client.accept(APPLICATION_XML);
Response r = client.post(request);
WebPTResponse resp = r.readEntity(WebPTResponse.class);
Now, the call is from one web server to another. If I call the target with my Tomcat, it works, if I call it from Websphere, is errors.
The instance of Response object is a
wsjar:file:/opt/was/profiles/WTUKCWASESI01_NODE01/installedApps/BS_Cell/ESIPTService.ear/ESIPTService.war/WEB-INF/lib/cxf-rt-frontend-jaxrs-2.7.7.jar!/org/apache/cxf/jaxrs/impl/ResponseImpl.class
The class loading in Websphere set to Parent Last.
I'm stuck for what to try next.
If I debug and try to step into the call to readEntity, it errors at that point.
Can anyone suggest a reason or something else I can test?
Full stack.
java.lang.NoSuchMethodError: javax/ws/rs/core/Response.readEntity(Ljava/lang/Class;)Ljava/lang/Object; at com.ptservice.impl.internal.PtServiceInternalImpl.sendRequest(PtServiceInternalImpl.java:191) at com.ptservice.impl.internal.PtServiceInternalImpl.processPt(PtServiceInternalImpl.java:126) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611)
remote debug shows...
r.getClass().getDeclaredMethods()[31]
(java.lang.reflect.Method) public java.lang.Object org.apache.cxf.jaxrs.impl.ResponseImpl.readEntity(java.lang.Class) throws javax.ws.rs.MessageProcessingException,java.lang.IllegalStateException