3 Replies Latest reply on Dec 10, 2013 9:43 AM by xcoulon

    Resteasy

    nickcave

      Hi all

      I am trying to implements a resteasy solution in project created with jboss forge.

      Jboss forge just adding this dependency in pom.xml

      <dependency>
          <groupId>org.jboss.spec.javax.ws.rs</groupId>
          <artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
          <scope>provided</scope>
      </dependency>
      

       

      I added manually this others dependencies:

      <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-jaxrs</artifactId>
          <version>2.3.6.Final</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-jaxb-provider</artifactId>
          <version>2.3.6.Final</version>
          <scope>provided</scope>
      </dependency>
      
      

       

      This is my full pom.xml

      http://pastebin.com/raw.php?i=dJNRgYvx

       

      My problem appears in eclipse, when I implement the interface PreProcessInterceptor

      Eclipse validate show me this error: "The Provider must implement at least one of the following interfaces: javax.ws.rs.ext.MessageBodyReader, javax.ws.rs.ext.MessageBodyWriter, javax.ws.rs.ext.ExceptionMapper or javax.ws.rs.ext.ContextResolver."


      This header of my class:

      @Named
      @Provider
      @ServerInterceptor
      public class RestSecurityInterceptor implements PreProcessInterceptor
      


      After deploy, the implements worked very well... problem just in eclipse validation...


      I believe there must be some dependency that is missing.
      Could anyone help me?

      thank you

        • 1. Re: Resteasy
          ajcmartins

          I'am experiencing the exact same issue, so input about this will be useful for me as well.

           

          Cheers,

          • 2. Re: Resteasy
            ctomc

            that would be more of a question forJBoss Tools

            • 3. Re: Resteasy
              xcoulon

              Hello Marcio,

               

              This is actually the JBoss Tools JAX-RS plugin that gives you this error message. It did not recognize your sublass of RESTEasy's PreProcessInterceptor as a valid JAX-RS Provider, because this class is an not part of the JAX-RS 1.1 spec.

               

              Nonetheless, you get rid of those false-positive message by disabling this specific validation. Go to Workbench Preferences>JBoss Tools>JAX-RS>JAX-RS Validator, then set the severity level to "Ignore" for the "Missing Provider Implementation" rule in the "JAX-RS Providers" category. You can also configure this rule at the project level if you prefer.

               

              I opened [JBIDE-16279] Support implementation specific providers - JBoss Issue Tracker to fix that problem in our tooling.

               

              Best regards,

              Xavier