Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-802

Problem applying RESTEasy 2.3.5 patch to JBoss

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.3.6.Final, 3.0-beta-4
    • 3.0-beta-1, 2.3.5.Final
    • None
    • None

    Description

      I attempt to apply the RESTEasy 2.3.5 patch by unzipping it in the modules directory in JBoss, and restarting JBoss. Before I apply this patch, everything works, but with an earlier version of RESTEasy. After I apply the 2.3.5 patch and deploy my ear, I get this error:

      11:06:02,691 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.subunit [name of project ear removed]...
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.x.incremental.1.jar:7.1.x.incremental.1]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_22]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_22]
      at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_22]

      Caused by: java.lang.NoSuchMethodError: org.jboss.resteasy.util.GetRestful.getSubResourceClass(Ljava/lang/Class;)Ljava/lang/Class;
      at org.jboss.as.jaxrs.deployment.JaxrsComponentDeployer.deploy(JaxrsComponentDeployer.java:66)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.x.incremental.1.jar:7.1.x.incremental.1]
      ... 5 more

      11:06:02,900 INFO [org.jboss.as.server] (management-handler-thread - 3) JBAS015870: Deploy of deployment "***.ear" was rolled back with failure message {"JBAS014671: Failed services" =>

      {"jboss.deployment.subunit.\"***.ear\".\"***.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"***.ear\".\"***.jar\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment \"***.jar\" of deployment \"***.ear\" Caused by: java.lang.NoSuchMethodError: org.jboss.resteasy.util.GetRestful.getSubResourceClass(Ljava/lang/Class;)Ljava/lang/Class;"}

      ,"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"**.ear\".\"*.war\".INSTALL Missing[JBAS014861: <one or more transitive dependencies>]","jboss.deployment.unit.\"**.ear\".INSTALL Missing[JBAS014861: <one or more transitive dependencies>]"]}

      I'm using Maven to build and deploy my application, but all RESTEasy dependencies have the "provided" scope so it is relying on JBoss to provide the jars.

      Instead of applying a patch, I'd much prefer to change the scope of the RESTEasy dependencies to "compile" so all necessary jars are included in the ear deployment, but that doesn't work - I get the following error:

      javax.servlet.ServletException: Servlet.init() for servlet ***.restful.RestfulServicesApplication threw exception
      org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
      org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:156)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)
      java.lang.Thread.run(Thread.java:679)

      root cause
      java.lang.RuntimeException: Unable to find a public constructor for class org.jboss.resteasy.core.AsynchronousDispatcher
      org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.registered(POJOResourceFactory.java:35)
      org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:120)
      org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:106)
      org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:83)
      org.jboss.resteasy.core.ResourceMethodRegistry.addPerRequestResource(ResourceMethodRegistry.java:72)
      org.jboss.resteasy.spi.ResteasyDeployment.registration(ResteasyDeployment.java:367)
      org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:225)
      org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.init(ServletContainerDispatcher.java:67)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.init(HttpServletDispatcher.java:36)
      org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
      org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:156)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)
      java.lang.Thread.run(Thread.java:679)

      Attachments

        Issue Links

          Activity

            People

              patriot1burke@gmail.com Bill Burke (Inactive)
              ezs_jira Elli Schwarz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: