0 Replies Latest reply on Feb 14, 2016 11:56 AM by nnn.

    wildfly10, jersey-mvc extension error java.lang.RuntimeException: RESTEASY003945: Unable to instantiate MessageBodyWriter

    nnn.

      hi,

      need to use in wildfly server the jersey jax-rs lib and jersey mvc extension .https://jersey.java.net/documentation/latest/mvc.html

       

      after added to project

       

      <dependency>
      <groupId>org.glassfish.jersey.containers</groupId>
      <artifactId>jersey-container-servlet</artifactId>
      <version>2.22.1</version>
      </dependency>


      jersey work well, added next dep


      <dependency>
      <groupId>org.glassfish.jersey.ext</groupId>
      <artifactId>jersey-mvc</artifactId>
      <version>2.22.1</version>
      </dependency>


      now deploy error

      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServiceLocator with qualifiers @Default

        at injection point [UnbackedAnnotatedField] @Inject private org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.serviceLocator

        at org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.serviceLocator(ViewableMessageBodyWriter.java:0)

      "}}

       

      read some posts and added that

       

      <dependency>
      <groupId>org.glassfish.jersey.containers.glassfish</groupId>
      <artifactId>jersey-gf-cdi</artifactId>
        <version>2.14</version>
      </dependency>


      deploy is ok, but now error in runtime


      java.lang.RuntimeException: RESTEASY003945: Unable to instantiate MessageBodyWriter


      as I can guess maybe need to disable resteasy or what to do ?

      thanks.