org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.StackOverflowError

Stack Overflow | kittu | 2 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug tip
    Check if you added Multipart filter to your web.xml file. Also, take a look here https://goo.gl/ntbxrA for common mistakes related to MultiPart File Upload and how to solve them.
  2. 0
    samebug tip
    The code you're using is probably expecting a value different of null for some variable or object.
  3. 0
    samebug tip
    This happens when you read the input as binary stream getInputStream() and character stream getReader, you can only use one way, or you can try this workaround https://goo.gl/IspUjB
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    If you're not using an embedded servlet container, try do disable the white label in your application.properties, with "server.error.whitelabel.enabled = false" otherwise check this answer on stackoverflow: https://goo.gl/rG0vKE
  6. 0
    samebug tip
    Check if your path is correct, if it's correct already you have to register your path to the mapping configuration.
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. org.springframework.web.util.NestedServletException

    Handler dispatch failed; nested exception is java.lang.StackOverflowError

    at org.springframework.web.servlet.DispatcherServlet.doDispatch()
  2. Spring MVC
    FrameworkServlet.doGet
    1. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:978)[spring-webmvc-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)[spring-webmvc-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    3. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)[spring-webmvc-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    4. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)[spring-webmvc-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    4 frames
  3. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:622)[tomcat-embed-core-8.5.6.jar:8.5.6]
    1 frame
  4. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)[spring-webmvc-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    1 frame
  5. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[tomcat-embed-core-8.5.6.jar:8.5.6]
    1 frame
  6. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2 frames
  7. Tomcat WS
    WsFilter.doFilter
    1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat-embed-websocket-8.5.6.jar:8.5.6]
    1 frame
  8. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2 frames
  9. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2 frames
  10. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2 frames
  11. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:89)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2 frames
  12. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2 frames
  13. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2 frames
  14. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2 frames
  15. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)[spring-web-4.3.5.RELEASE.jar:4.3.5.RELEASE]
    2 frames
  16. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)[tomcat-embed-core-8.5.6.jar:8.5.6]
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)[tomcat-embed-core-8.5.6.jar:8.5.6]
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)[tomcat-embed-core-8.5.6.jar:8.5.6]
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)[tomcat-embed-core-8.5.6.jar:8.5.6]
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)[tomcat-embed-core-8.5.6.jar:8.5.6]
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[tomcat-embed-core-8.5.6.jar:8.5.6]
    8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)[tomcat-embed-core-8.5.6.jar:8.5.6]
    9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)[tomcat-embed-core-8.5.6.jar:8.5.6]
    9 frames
  17. Grizzly HTTP
    SocketProcessorBase.run
    1. org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784)[tomcat-embed-core-8.5.6.jar:8.5.6]
    2. org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)[tomcat-embed-core-8.5.6.jar:8.5.6]
    3. org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)[tomcat-embed-core-8.5.6.jar:8.5.6]
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)[tomcat-embed-core-8.5.6.jar:8.5.6]
    5. org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)[tomcat-embed-core-8.5.6.jar:8.5.6]
    5 frames
  18. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0_102]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0_102]
    2 frames
  19. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-embed-core-8.5.6.jar:8.5.6]
    1 frame
  20. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[?:1.8.0_102]
    1 frame