1 Reply Latest reply on Jun 27, 2010 3:49 PM by rsoika

    unable to deploy rest-service based on jersey (jboss-5.1.0.GA)

    rsoika

      Hi,

      I have a problem with the deplyoment of a web module containing a rest service (JAX-REST) using jersey.

      My web module is part of an ear module.

      The web module contains a /lib/ folder with the following jersey jars and ressource classes:

       

      WEB-INF

        |- classes

           |- ...package containing my rest ressource classes.....

        |- lib

            |- asm-31.jar

            |- jersey-core-1.0.jar

            |- jersey-server-1.0.jar

            |- jsr311-api-1.0.jar

       

      my web.xml defines the package to be scanned for rest ressource classes:

       

      .....

      <servlet>
              <servlet-name>Jersey Web Application</servlet-name>
              <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
              <init-param>
                  <param-name>com.sun.jersey.config.property.packages</param-name>
                  <param-value>org.imixs.workflow.jee.rest.jaxrs</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
          </servlet>
          <servlet-mapping>
              <servlet-name>Jersey Web Application</servlet-name>
              <url-pattern>/*</url-pattern>
          </servlet-mapping>

      .....

       

       

      But I allway got the following error during deplyoment:

       

       

      18:27:23,948 INFO  [PackagesResourceConfig] Scanning for root resource and provider classes in the packages:
        org.imixs.workflow.jee.rest.jaxrs
      18:27:23,952 WARNING [AnnotatedClassScanner] URL, vfszip:/opt/jboss-5.1.0.GA/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.2-jboss51-rc2.ear/imixs-workflow-jsf-sample-rest-0.0.2-jboss51-rc2.war/WEB-INF/classes/org/imixs/workflow/jee/rest/jaxrs/, is ignored, it not a file or a jar file URL
      18:27:24,166 SEVERE [WebApplicationImpl] The ResourceConfig instance does not contain any root resource classes.
      18:27:24,166 ERROR [[/workflow-rest]] StandardWrapper.Throwable
      com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.

       

       

      Why did jboss tell me about the warning taht the URL :

       

      vfszip:/opt/jboss-5.1.0.GA/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.2-jboss51-rc2.ear/imixs-workflow-jsf-sample-rest-0.0.2-jboss51-rc2.war/WEB-INF/classes/org/imixs/workflow/jee/rest/jaxrs/

       

      will be ignored? This is the locaten where my resource classes are located. I checked this - the classes are available in the war file :-/

       

       

      Dose anybody know what I did wrong?

      Thanks for help

       

      Ralph