I am trying to build a async REST client but getting following error in IBM WebSphere 8.5, java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/ws/rs/client/ClientBuilder
While building ClientBuilder object. I tried to search everywhere but solution is provided for other application servers not for IBM WebSphere. When I decompiled ClientBuilder class it expect the property JAXRS_DEFAULT_CLIENT_BUILDER = "org.glassfish.jersey.client.JerseyClientBuilder";
but what is the value of implementation class/property for WebSphere?
Code I am trying to run,
ClientBuilder cb = ClientBuilder.newBuilder(); // Exception occurs at this line
Client client = cb.build();
WebTarget target = client.target(URL);
Future<Response> future = target.request(MediaType.APPLICATION_XML).async().
post(Entity.entity(notifications, MediaType.APPLICATION_XML));
Response response = future.get(5, TimeUnit.SECONDS);
if(response.getStatus() == SUCCESS) {
respStatus = SUCCESS;
}
Am I missing some configuration? or property setting?
Note: I have added javax.ws.rs-api-2.0-m10.jar on classpath.