Jersey Rest Easy服务和JBoss EAP 6.3

时间:2015-04-29 10:41:29

标签: jersey resteasy jboss-eap-6

我在我的应用程序中使用Jersey实现了Rest Services。我正在尝试迁移到JBoss EAP 6.3,我无法迁移其他服务。

我在启动时遇到以下错误:

16:00:56,741 SEVERE [com.sun.jersey.server.impl.application.RootResourceUriRules] (ServerService Thread Pool -- 66) The ResourceConfig instance does not contain any root resource classes.
16:00:56,752 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/pharma]] (ServerService Thread Pool -- 66) JBWEB000289: Servlet Rest Services threw load() 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.<init>(RootResourceUriRules.java:99) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1308) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:171) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:777) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:773) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:773) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:768) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:208) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373) [jersey-bundle-1.12.jar:1.12]
    at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556) [jersey-bundle-1.12.jar:1.12]
    at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1100) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3591) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3798) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:59) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:94) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_55]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_55]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)

我的web.xml有以下标记:

<servlet-name>Rest Services</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
        <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>com.sun.jersey.config.property.packages</param-name>
      <param-value>com.pharma.ws.rest com.pharma.intg.webservices.rest com.pharma.ws.test.rest com.org.codehaus.jackson.jaxrs</param-value>
    </init-param>
    <init-param>
        <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
        <param-value>com.pharma.intg.webservices.rest.filters.CMnRESTWebSvcResponseFilter</param-value>
    </init-param>
    <init-param>
        <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
        <param-value>com.pharma.intg.webservices.rest.filters.CMnRESTWebSvcRequestFilter</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

我在上面提到的所有3个包中都有@Path(&#34; / offer&#34;),@ Path(&#34; / create&#34;)和@Path(&#34; /修改&#34;)在场。

我从standalone.xml中删除了所有jaxrs。

如果我遗失了某些内容,有人可以告诉我。

0 个答案:

没有答案