1 2 Previous Next 15 Replies Latest reply: Dec 20, 2011 11:51 PM by Hendy Irawan RSS

WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?

Guofeng Zhang Novice

I deployed a sample war of Atmosphere ( a comet framework) on JBoss 6 final, but I got:

 

2011-01-10 16:45:11,328 ERROR[ProfileServiceBootstrap] (Thread-2) Failed to load profile::org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incompletedeployments (SEE PREVIOUS ERRORS FOR DETAILS):

 

DEPLOYMENTS IN ERROR:

  Deployment"vfs:///D:/projects/samples/jboss-6.0.0.Final/server/default/deploy/jquery-pubsub.war"is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException:Only one JAX-RS Application Class allowed.com.sun.jersey.api.core.WebAppResourceConfigcom.sun.jersey.api.core.ApplicationAdaptercom.sun.jersey.api.core.ScanningResourceConfigcom.sun.jersey.api.core.ResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfigcom.sun.jersey.api.core.ClasspathResourceConfigcom.sun.jersey.api.core.DefaultResourceConfigcom.sun.jersey.api.core.PackagesResourceConfigcom.sun.jersey.api.core.ClassNamesResourceConfig

 

        at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228)[:2.2.0.GA]

        atorg.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905)[:2.2.0.GA]

        at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87)[:6.0.0.Final]

       atorg.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107)[:0.2.2]

        at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135)[:6.0.0.Final]

        atorg.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56)[:6.0.0.Final]

        atorg.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827)[jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]

        atorg.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417)[jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]

        at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]

 

2011-01-10 16:45:11,359 INFO [org.apache.coyote.http11.Http11Protocol] (Thread-2) Starting Coyote HTTP/1.1on http-127.0.0.1-8080

2011-01-10 16:45:11,359 INFO [org.apache.coyote.ajp.AjpProtocol] (Thread-2) Starting Coyote AJP/1.3 onajp-127.0.0.1-8009

2011-01-10 16:45:11,390 INFO [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-2) JBossAS[6.0.0.Final "Neo"] Started in 43s:687ms

 

I do not understand "Only one JAX-RS Application Class allowed.....".

 

Does JBoss 6 final package Jersey in the download? How to solve it?

 

I just download the zip, unzip it, deploy my war, then launch the JBoss.

 

Thanks for your help.

  • 1. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    jaikiran pai Master

    That exception is being thrown from RestEasy deployer in JBoss AS. RestEasy http://www.jboss.org/resteasy is by default shipped in JBoss AS 6.

  • 2. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Guofeng Zhang Novice

    Remove resteasy.deployer from the deployer solve the issue.

     

    But what does resteasy.deployer do? To scan the resources on other web service war?

  • 3. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Prasanna vijayaragavan Newbie

    Even i am facing the same issue... Can you please tell me how to overcome this issue?

    Should i delete any file?

  • 4. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Prasanna vijayaragavan Newbie

    Failed to create Resource newRestJboss.war - cause: java.lang.Exception:Failed to start deployment [vfs:///C:/jboss/server/default/deploy/newRestJboss.war] during deployment of 'newRestJboss.war' - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):*** DEPLOYMENTS IN ERROR: Name -> Errorvfs:///C:/jboss/server/default/deploy/newRestJboss.war -> org.jboss.deployers.spi.DeploymentException: java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer from BaseClassLoader@18fff7b{vfs:///C:/jboss/server/default/deploy/newRestJboss.war}DEPLOYMENTS IN ERROR:  Deployment "vfs:///C:/jboss/server/default/deploy/newRestJboss.war" is in error due to the following reason(s): java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer from BaseClassLoader@18fff7b{vfs:///C:/jboss/server/default/deploy/newRestJboss.war} -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):*** DEPLOYMENTS IN ERROR: Name -> Errorvfs:///C:/jboss/server/default/deploy/newRestJboss.war -> org.jboss.deployers.spi.DeploymentException: java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer from BaseClassLoader@18fff7b{vfs:///C:/jboss/server/default/deploy/newRestJboss.war}DEPLOYMENTS IN ERROR:  Deployment "vfs:///C:/jboss/server/default/deploy/newRestJboss.war" is in error due to the following reason(s): java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer from BaseClassLoader@18fff7b{vfs:///C:/jboss/server/default/deploy/newRestJboss.war}

  • 5. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Guofeng Zhang Novice

    I think the issue you met is different from what I met. You please check if jersey-server-xx.jar is in WEB-INF\lib.

     

    If you use Jersey, there should be jersey-core-xx.jar and jersey-server-xx.jar  in WEB-INF\lib.

  • 6. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Prasanna vijayaragavan Newbie

    Failed to create Resource newRestJboss.war - cause: java.lang.Exception:Failed to start deployment [vfs:///C:/jboss/server/default/deploy/newRestJboss.war] during deployment of 'newRestJboss.war' - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):*** DEPLOYMENTS IN ERROR: Name -> Errorvfs:///C:/jboss/server/default/deploy/newRestJboss.war -> org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ResourceConfigDEPLOYMENTS IN ERROR:  Deployment "vfs:///C:/jboss/server/default/deploy/newRestJboss.war" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ResourceConfig -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):*** DEPLOYMENTS IN ERROR: Name -> Errorvfs:///C:/jboss/server/default/deploy/newRestJboss.war -> org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ResourceConfigDEPLOYMENTS IN ERROR:  Deployment "vfs:///C:/jboss/server/default/deploy/newRestJboss.war" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ResourceConfig

  • 7. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Viggo Navarsete Expert

    Hi,

     

    any solution to this problem? I'm also experiencing the same when I deploy my application. I've bundled jersey-core-1.2.jar, jersey-server-1.2.jar with my app. I hope we don't have to delete stuff from the JBoss installation in order to fix this!!

  • 8. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Prasanna vijayaragavan Newbie

    Please do give the solution if someone knows how to fix this issue

     

     

    Failed to create Resource newRestJboss.war - cause: java.lang.Exception:Failed to start deployment [vfs:///C:/jboss/server/default/deploy/newRestJboss.war] during deployment of 'newRestJboss.war' - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):*** DEPLOYMENTS IN ERROR: Name -> Errorvfs:///C:/jboss/server/default/deploy/newRestJboss.war -> org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ResourceConfigDEPLOYMENTS IN ERROR:  Deployment "vfs:///C:/jboss/server/default/deploy/newRestJboss.war" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ResourceConfig -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):*** DEPLOYMENTS IN ERROR: Name -> Errorvfs:///C:/jboss/server/default/deploy/newRestJboss.war -> org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ResourceConfigDEPLOYMENTS IN ERROR:  Deployment "vfs:///C:/jboss/server/default/deploy/newRestJboss.war" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.server.impl.application.DeferredResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ResourceConfig

  • 9. Re: WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Viggo Navarsete Expert

    I made an issue for this problem since no one seems to have a solution, and several people have problems with it: https://issues.jboss.org/browse/JBAS-8830

  • 10. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    henk de boer Master

    Viggo Navarsete wrote:

     

    Hi,

     

    any solution to this problem? I'm also experiencing the same when I deploy my application. I've bundled jersey-core-1.2.jar, jersey-server-1.2.jar with my app.

     

    What about simply NOT bundling?

     

    There are always similar problems when you bundle jstl, standard, jsf, jpa etc with your application. In general you shouldn't just bundle stuff that your runtime already publicly provides. Endorsed dirs and special mechanisms that explicitly allow you to do this are an exception.

  • 11. WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Viggo Navarsete Expert

    HI,

     

    I use Enunciate to wire up my endpoints (both SOAP and REST), and Enunciate currently uses Jersey. We are currently working with Enunciate to provide a solution, which will be to replaces Jersey with RestEasy. Not done yet though...

  • 12. Re: WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Prasanna vijayaragavan Newbie

    Hi,

       Does anyone know what is the solution to the below mentioned problem????

     

    Failed to create Resource CEPandPRE.war - cause: java.lang.Exception:Failed to start deployment [vfs:///C:/jboss/server/default/deploy/CEPandPRE.war] during deployment of 'CEPandPRE.war' - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):  *** DEPLOYMENTS IN ERROR: Name -> Error  vfs:///C:/jboss/server/default/deploy/CEPandPRE.war -> org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.welldoc.es.pre.data.receiver.PREReceiverApplication com.welldoc.es.cep.receiver.BasePOCApplication   DEPLOYMENTS IN ERROR: Deployment "vfs:///C:/jboss/server/default/deploy/CEPandPRE.war" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.welldoc.es.pre.data.receiver.PREReceiverApplication com.welldoc.es.cep.receiver.BasePOCApplication -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):  *** DEPLOYMENTS IN ERROR: Name -> Error  vfs:///C:/jboss/server/default/deploy/CEPandPRE.war -> org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.welldoc.es.pre.data.receiver.PREReceiverApplication com.welldoc.es.cep.receiver.BasePOCApplication   DEPLOYMENTS IN ERROR: Deployment "vfs:///C:/jboss/server/default/deploy/CEPandPRE.war" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: Only one JAX-RS Application Class allowed. com.welldoc.es.pre.data.receiver.PREReceiverApplication com.welldoc.es.cep.receiver.BasePOCApplication

  • 13. Re: WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    lionelg Newbie

    Check your project,

    you have more that one class extending "javax.ws.rs.core.Application".

  • 14. Re: WHy I get "Only one JAX-RS Application Class allowed.." on JBoss 6 final?
    Viggo Navarsete Expert

    Enunciate has created a plugin which makes it possible to replace Jersey with RestEasy, the plugin is called maven-enunciate-jboss-plugin, and you can get a complete setup from either me or Ryan (hosting the Enunciate project) if needed!

     

    Enunciate is btw a great project, it takes care of wiring up all the necessary pieces (servlets n'stuff in web.xml) and generates excellent documentation for all your endpoints at the same time! You'd better check it out;) http://enunciate.codehaus.org/

1 2 Previous Next