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 :

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

@Path("/hello")
public class HelloWorldService {

@GET
@Path("/{param}")
public Response getMsg(@PathParam("param") String msg) {

String output = "Jersey say : " + msg;

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

}

}

}

No comments:

Post a Comment