[Jersey] “The ResourceConfig instance does not contain any root resource classes” - when the resource classes are in a separate jar

From: daudiam <>
Date: Mon, 13 Feb 2012 21:52:36 -0800 (PST)

The error has been discussed extensively but in my case, i*t doesn't appear
if the application class and resource class are packaged in the same war*.
In case the resource class is an ejb (annotated with @Stateless) and placed
in a separate jar, then the package containing the resource EJB is not
found. I am using* JBoss 6.1 Final and Jersey*. The following is my
application file (in the org.what package and deployed as a war) :

public class InformationApplication extends PackagesResourceConfig {
    public InformationApplication() {

The resource file is as follows (in the org.what.resources package and
deployed as a jar):

public class InformationResource {

    public BiographicalInformation getBiographicalInfo(){

        BiographicalInformation info = new BiographicalInformation();
        info.setJob("Web developer");

        return info;


The model class BiographicalInformation is also packaged in the jar
containing the resource class. I am not using any web.xml. The
application.xml file is :

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi=""
xsi:schemaLocation="" id="Application_ID"

View this message in context:
Sent from the Jersey mailing list archive at