java.lang.IllegalStateException: Unsupported argument [org.springframework.web.bind.MissingServletRequestParameterException] for @ExceptionHandler method: public java.lang.String com.mycompany.AbstractFooController.handleMissingRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException,javax.servlet.http.HttpServletRequest)

Spring JIRA | Morten Andersen-Gott | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Opening this issue as a response to Rossen's comment in SPR-7983: We keep seeing exceptions in the logs seemingly caused by the AnnoationMethodHandlerExceptionResolver. Here's a snapshot from the logs {code} [DEBUG] [2012.02.27 11:15:19] (T0tXt1BbKEcAAD4WCUcAAAAP) Resolving exception from handler [com.mycompany.FooController@36be9ce9]: java.lang.NullPointerException [] at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:132) [ERROR] [2012.02.27 11:15:19] (T0tXt1BbKEcAAD4WCUcAAAAP) Invoking request method resulted in exception : public java.lang.String com.mycompany.AbstractFooController.handleMissingRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException,javax.servlet.http.HttpServletRequest) [] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:143) java.lang.IllegalStateException: Unsupported argument [org.springframework.web.bind.MissingServletRequestParameterException] for @ExceptionHandler method: public java.lang.String com.mycompany.AbstractFooController.handleMissingRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException,javax.servlet.http.HttpServletRequest) 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:1120) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:944) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) {code} The first debug statement is from the same request as the next log statement (the ERROR). So, a NPE is the cause. We have a @ExceptionHandler method specified to handle MissingServletRequestParameterException. This should not be invoked, but seems to be invoked for some reason. The ERROR-log statement is saying that XX is a Unsupported argument for a method taking XX. There seem to be something seriously wrong with the matching algorithme. I haven't been able to pin-point what it is though, as I haven't been able to reproduce in a controlled environment (it is typically seen between 1 and 10 times each day in the production logs). This fact alone makes me suspect that it stems from a concurrency issue, one has already been identified in SPR-9138

    Spring JIRA | 5 years ago | Morten Andersen-Gott
    java.lang.IllegalStateException: Unsupported argument [org.springframework.web.bind.MissingServletRequestParameterException] for @ExceptionHandler method: public java.lang.String com.mycompany.AbstractFooController.handleMissingRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException,javax.servlet.http.HttpServletRequest)
  2. 0

    Opening this issue as a response to Rossen's comment in SPR-7983: We keep seeing exceptions in the logs seemingly caused by the AnnoationMethodHandlerExceptionResolver. Here's a snapshot from the logs {code} [DEBUG] [2012.02.27 11:15:19] (T0tXt1BbKEcAAD4WCUcAAAAP) Resolving exception from handler [com.mycompany.FooController@36be9ce9]: java.lang.NullPointerException [] at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:132) [ERROR] [2012.02.27 11:15:19] (T0tXt1BbKEcAAD4WCUcAAAAP) Invoking request method resulted in exception : public java.lang.String com.mycompany.AbstractFooController.handleMissingRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException,javax.servlet.http.HttpServletRequest) [] at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(AnnotationMethodHandlerExceptionResolver.java:143) java.lang.IllegalStateException: Unsupported argument [org.springframework.web.bind.MissingServletRequestParameterException] for @ExceptionHandler method: public java.lang.String com.mycompany.AbstractFooController.handleMissingRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException,javax.servlet.http.HttpServletRequest) 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:1120) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:944) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) {code} The first debug statement is from the same request as the next log statement (the ERROR). So, a NPE is the cause. We have a @ExceptionHandler method specified to handle MissingServletRequestParameterException. This should not be invoked, but seems to be invoked for some reason. The ERROR-log statement is saying that XX is a Unsupported argument for a method taking XX. There seem to be something seriously wrong with the matching algorithme. I haven't been able to pin-point what it is though, as I haven't been able to reproduce in a controlled environment (it is typically seen between 1 and 10 times each day in the production logs). This fact alone makes me suspect that it stems from a concurrency issue, one has already been identified in SPR-9138

    Spring JIRA | 5 years ago | Morten Andersen-Gott
    java.lang.IllegalStateException: Unsupported argument [org.springframework.web.bind.MissingServletRequestParameterException] for @ExceptionHandler method: public java.lang.String com.mycompany.AbstractFooController.handleMissingRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException,javax.servlet.http.HttpServletRequest)
  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 [org.springframework.web.bind.MissingServletRequestParameterException] for @ExceptionHandler method: public java.lang.String com.mycompany.AbstractFooController.handleMissingRequestParameterException(org.springframework.web.bind.MissingServletRequestParameterException,javax.servlet.http.HttpServletRequest)

      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:1120)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:944)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
      8 frames
    3. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      1 frame