Thursday, 7 April 2016

Jersey :
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.

In the service class provide the root path. if root is not provide or we have not annoted class with @Path.

ex :

@Path("/test")     // provide the root path
public class voice {

public class HelloWorldService {

public Response getMsg(@PathParam("param") String msg) {

String output = "Jersey say : " + msg;

return Response.status(200).entity(output).build();




No comments:

Post a Comment