java.lang.IllegalStateException: Unsupported argument [javax.validation.ConstraintViolationException] for @ExceptionHandler method: public void se.lantmateriet.dominium.web.ChangeTransactionController.badRequest(javax.validation.ConstraintViolationException,javax.servlet.http.HttpServletResponse) throws java.io.IOException

Spring JIRA | Magnus Heino | 6 years ago
  1. 0

    Works with 3.0.5.RELEASE. Method: @ResponseStatus(BAD_REQUEST) @ExceptionHandler({ ConstraintViolationException.class }) public void badRequest(final ConstraintViolationException e, final HttpServletResponse response) throws IOException {} Exception: java.lang.IllegalStateException: Unsupported argument [javax.validation.ConstraintViolationException] for @ExceptionHandler method: public void se.lantmateriet.dominium.web.ChangeTransactionController.badRequest(javax.validation.ConstraintViolationException,javax.servlet.http.HttpServletResponse) throws java.io.IOException at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.resolveHandlerArguments(AnnotationMethodHandlerExceptionResolver.java:264) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:135) at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136) at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:987) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:811) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)

    Spring JIRA | 6 years ago | Magnus Heino
    java.lang.IllegalStateException: Unsupported argument [javax.validation.ConstraintViolationException] for @ExceptionHandler method: public void se.lantmateriet.dominium.web.ChangeTransactionController.badRequest(javax.validation.ConstraintViolationException,javax.servlet.http.HttpServletResponse) throws java.io.IOException
  2. 0

    Works with 3.0.5.RELEASE. Method: @ResponseStatus(BAD_REQUEST) @ExceptionHandler({ ConstraintViolationException.class }) public void badRequest(final ConstraintViolationException e, final HttpServletResponse response) throws IOException {} Exception: java.lang.IllegalStateException: Unsupported argument [javax.validation.ConstraintViolationException] for @ExceptionHandler method: public void se.lantmateriet.dominium.web.ChangeTransactionController.badRequest(javax.validation.ConstraintViolationException,javax.servlet.http.HttpServletResponse) throws java.io.IOException at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.resolveHandlerArguments(AnnotationMethodHandlerExceptionResolver.java:264) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:135) at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136) at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:987) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:811) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)

    Spring JIRA | 6 years ago | Magnus Heino
    java.lang.IllegalStateException: Unsupported argument [javax.validation.ConstraintViolationException] for @ExceptionHandler method: public void se.lantmateriet.dominium.web.ChangeTransactionController.badRequest(javax.validation.ConstraintViolationException,javax.servlet.http.HttpServletResponse) throws java.io.IOException
  3. 0

    How to manage two HTTP Request towards the same folder but with differents HTTP Parameters in Spring MVC?

    Stack Overflow | 4 years ago | AndreaNobili
    java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8080/spring-mvc-showcase/mapping/parameter': {public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameter(java.lang.String), public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameterNegation()}
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Taking an HTTP Request parameter in Spring MVC

    Stack Overflow | 4 years ago | AndreaNobili
    java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8080/spring-mvc-showcase/mapping/parameter': {public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameter2(java.lang.String), public java.lang.String org.springframework.samples.mvc.mapping.MappingController.byParameterNegation()}
  6. 0

    SimpleFormController Issue in Java

    Stack Overflow | 2 years ago | Venkat
    java.lang.IllegalStateException: Cannot create command without commandClass being set - either set commandClass or (in a form controller) override formBackingObject

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Unsupported argument [javax.validation.ConstraintViolationException] for @ExceptionHandler method: public void se.lantmateriet.dominium.web.ChangeTransactionController.badRequest(javax.validation.ConstraintViolationException,javax.servlet.http.HttpServletResponse) throws java.io.IOException

      at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.resolveHandlerArguments()
    2. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.resolveHandlerArguments(AnnotationMethodHandlerExceptionResolver.java:264)
      2. org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:135)
      3. org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:136)
      4. org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:987)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:811)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
      8 frames