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

resteasy-validator-provider-11 3.0.7.Final validation error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Critical
    • 3.0.9.Final
    • 3.0.7.Final
    • CDI Integration, jaxrs
    • None

    Description

      I'm trying to validate the parameters of a method in a RESTful interface below:


      @Path("

      {id}

      ")
      @GET
      @Produces(

      { MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
      @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }

      )
      public Response getAsset(@Min(value=5,message="

      {com.isone.cts.rest.error.message.min}

      ") @Max(value=50,message="Cannot be greater than 50") @PathParam("id") long assetId);

      Implementation of the method:


      @Override
      public Response getAsset(long assetId) {
      if (logger.isDebugEnabled())

      { logger.debug(" Received request with ASSERT ID " + assetId); }

      Asset asset = new Asset();
      try

      { // Some logic }

      catch (ServiceException serviceException)

      { logger.error(" Exception occured " + serviceException.getMessage()); throw serviceException; }

      return Response.ok(asset).build();
      }


      As soon as I hit the URL http://localhost:8080/rest/services/assets/16 I see an internal server error HTTP Status 500.
      I tried loading the validation through XML configuration and removing the interface and directly placing the annotations on the implementation method. In all the cases I saw the same exception. Just to make sure I debugged the issue, and noticed that it was failing on validator.forExecutables() with Method "forExecutables" with signature Ljavax/validation/executable/ExecutableValidator is not applicable on this object. h3.This occurs on line 155 in GeneralValidatorImpl.java inside resteasy-validator-provider-11.jar

      Below is a trace of the exception:


      java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ValidatorImpl.forExecutables()Ljavax/validation/executable/ExecutableValidator;
      org.jboss.resteasy.plugins.validation.GeneralValidatorImpl.validateAllParameters(GeneralValidatorImpl.java:155)
      org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:116)
      org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:288)
      org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:242)
      org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:229)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
      org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)

      Attachments

        Activity

          People

            rsigal@redhat.com Ronald Sigal
            sandeepreddip_jira Sandeep Poreddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: