I developing a Jersey based application and using Grizzly to test the application. As long as I run it from Eclipse everything works well! However, when I do an export to a runnable Jar and execute at the Windows 7 command prompt I am consistently getting the error message below: My main method is listed, what am I missing. (Thanks for the help)
private static final String PORT="8899";
private static final String MACHINE="http://localhost";
private static final String MAIN_PACKAGE="aklero.idea.persistence";
private static final String JERSEY_PACKAGE="com.sun.jersey.config.property.packages";
private static final String MACHINE_URI=MACHINE+":"+PORT+"/";
public static void main(String[] args) throws IOException
{
final String baseUri = MACHINE_URI;
final Map<String, String> initParams = new HashMap<String, String>();
initParams.put(JERSEY_PACKAGE, MAIN_PACKAGE);
System.out.println("Starting grizzly...");
SelectorThread threadSelector = GrizzlyWebContainerFactory.create(baseUri, initParams);
System.in.read();
threadSelector.stopEndpoint();
System.exit(0);
}
The errors I am getting:
SEVERE: The ResourceConfig instance does not contain any root resource classes.
Apr 28, 2011 12:42:56 PM com.sun.grizzly.http.servlet.ServletAdapter doService
SEVERE: service exception:
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not
contain any root resource classes.
at com.sun.jersey.server.impl.application.RootResourceUriRules.
(RootResourceUriRules.java:103)