0 Replies Latest reply on Jun 9, 2014 8:38 AM by Laxminarayana Challagonda

    how to avoid conflict using jersey and resteasy

    Laxminarayana Challagonda Newbie

      I am  using Jersey to access our web Application from Android and also Using RestEasy to call web service from web application(async web service call) so,When starting server(jboss7.1.1 final) getting the following exception and unable to access the web Application from Android.

      Exception details are

      SEVERE: Missing dependency for constructor public org.jboss.resteasy.core.AsynchronousDispatcher(org.jboss.resteasy.spi.ResteasyProviderFactory) at parameter index 0

      17:22:25,115 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/QuoterWeb]] (MSC service thread 1-4) StandardWrapper.Throwable: com.sun.jersey.spi.inject.Errors$ErrorMessagesException

        at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170) [jersey-core-1.9.1.jar:1.9.1]

        at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136) [jersey-core-1.9.1.jar:1.9.1]

        at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199) [jersey-core-1.9.1.jar:1.9.1]

        at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:771) [jersey-server-1.9.1.jar:1.9.1]

        at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:766) [jersey-server-1.9.1.jar:1.9.1]

        at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:488) [jersey-server-1.9.1.jar:1.9.1]

        at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:318) [jersey-server-1.9.1.jar:1.9.1]

        at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:609) [jersey-server-1.9.1.jar:1.9.1]

        at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210) [jersey-server-1.9.1.jar:1.9.1]

        at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373) [jersey-server-1.9.1.jar:1.9.1]

        at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556) [jersey-server-1.9.1.jar:1.9.1]

        at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]

        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]

        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_51]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_51]

        at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_51]

       

      my web.xml containing following configuration for resteasy

       

      <context-param>

          <param-name>resteasy.scan</param-name>

          <param-value>false</param-value>

        </context-param>

        <context-param>

          <param-name>resteasy.scan.providers</param-name>

          <param-value>false</param-value>

        </context-param>

        <context-param>

          <param-name>resteasy.scan.resources</param-name>

          <param-value>false</param-value>

        </context-param>

        <context-param>

          <param-name>resteasy.use.deployment.sensitive.factory</param-name>

          <param-value>false</param-value>

      </context-param>

         <context-param>

              <param-name>resteasy.async.job.service.enabled</param-name>

              <param-value>true</param-value>

          </context-param>

       

       

          <context-param>

              <param-name>resteasy.async.job.service.max.job.results</param-name>

              <param-value>100</param-value>

          </context-param>

          <context-param>

              <param-name>resteasy.async.job.service.max.wait</param-name>

              <param-value>300000</param-value>

          </context-param>

          <context-param>

              <param-name>resteasy.async.job.service.thread.pool.size</param-name>

              <param-value>100</param-value>

          </context-param>

          <context-param>

              <param-name>resteasy.async.job.service.base.path</param-name>

              <param-value>/asynch/jobs</param-value>

          </context-param>

      for jersey

      <servlet>

          <servlet-name>Jersey REST Service</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>.............</param-value>

          </init-param> -->

          <load-on-startup>1</load-on-startup>

        </servlet>

           <servlet-mapping>

              <servlet-name>Jersey REST Service</servlet-name>

             <url-pattern>/rest/*</url-pattern>

           </servlet-mapping>

       

      Thanks in Advance