org.springframework.web.util.NestedServletException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • So before I get to the point I have to explain my setup. I have a jar (called {{restservices.jar}}) which holds all my spring repositories and rest configuration. This jar is mapped under it's own web-config under {{/rest/}} {code} /* Spring REST Delegating Dispatcher Servlet */ Servlet restDispatcherServlet = new RepositoryRestDispatcherServlet(webCtx); ServletRegistration.Dynamic restDispatcherServletReg = servletContext.addServlet("restDispatcherServlet", restDispatcherServlet); restDispatcherServletReg.setLoadOnStartup(1); restDispatcherServletReg.addMapping("/rest/*"); {code} I also have a webapplication in a war file (called storefront.war) and the user has the ability to include the {{restservices.jar}} in {{WEB-INF/lib}}. The storefront is mapped under {{/}}: {code} final Servlet dispatcherServlet = new DispatcherServlet(webCtx); final ServletRegistration.Dynamic dispatcherServletReg = servletContext.addServlet("dispatcherServlet", dispatcherServlet); dispatcherServletReg.setInitParameter("contextConfigLocation", ""); dispatcherServletReg.setLoadOnStartup(1); dispatcherServletReg.addMapping("/"); {code} So far it all worked fine - user can open the {{/storefront}} and see the storefront and also open the {{/storefront/rest}} and use the rest. But because I'm building with the latest SNAPSHOT it all broke down yesterday. Now when the user opens the {{/storefront}} they see an exception: {code} org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8111/storefront/': {public java.lang.String com.xxxx.storefront.controllers.pages.HomePageController.home(org.springframework.ui.Model,java.lang .String,javax.servlet.http.HttpServletRequest), public org.springframework.http.HttpEntity org.springframework.data.rest.webmvc.RepositoryController.listRepositories()} at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:711) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1644) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ... {code} And I believe it is because of this commit: https://github.com/spring-projects/spring-data-rest/commit/e70285331c3270d88fe47a576c13bcae795763a8#diff-56747b96ce7be9e2c805687d47b49b54 Please confirm if it's a bug and fix it if it is :) Thanks
    via by Petar Tahchiev,
  • So before I get to the point I have to explain my setup. I have a jar (called {{restservices.jar}}) which holds all my spring repositories and rest configuration. This jar is mapped under it's own web-config under {{/rest/}} {code} /* Spring REST Delegating Dispatcher Servlet */ Servlet restDispatcherServlet = new RepositoryRestDispatcherServlet(webCtx); ServletRegistration.Dynamic restDispatcherServletReg = servletContext.addServlet("restDispatcherServlet", restDispatcherServlet); restDispatcherServletReg.setLoadOnStartup(1); restDispatcherServletReg.addMapping("/rest/*"); {code} I also have a webapplication in a war file (called storefront.war) and the user has the ability to include the {{restservices.jar}} in {{WEB-INF/lib}}. The storefront is mapped under {{/}}: {code} final Servlet dispatcherServlet = new DispatcherServlet(webCtx); final ServletRegistration.Dynamic dispatcherServletReg = servletContext.addServlet("dispatcherServlet", dispatcherServlet); dispatcherServletReg.setInitParameter("contextConfigLocation", ""); dispatcherServletReg.setLoadOnStartup(1); dispatcherServletReg.addMapping("/"); {code} So far it all worked fine - user can open the {{/storefront}} and see the storefront and also open the {{/storefront/rest}} and use the rest. But because I'm building with the latest SNAPSHOT it all broke down yesterday. Now when the user opens the {{/storefront}} they see an exception: {code} org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8111/storefront/': {public java.lang.String com.xxxx.storefront.controllers.pages.HomePageController.home(org.springframework.ui.Model,java.lang .String,javax.servlet.http.HttpServletRequest), public org.springframework.http.HttpEntity org.springframework.data.rest.webmvc.RepositoryController.listRepositories()} at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:711) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1644) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) ... {code} And I believe it is because of this commit: https://github.com/spring-projects/spring-data-rest/commit/e70285331c3270d88fe47a576c13bcae795763a8#diff-56747b96ce7be9e2c805687d47b49b54 Please confirm if it's a bug and fix it if it is :) Thanks
    via by Petar Tahchiev,
  • Fails to upload large app
    via GitHub by robertgmoss
    ,
  • Spring Data Rest gives GC overhead exceeded
    via Stack Overflow by fortm
    ,
    • org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Ambiguous handler methods mapped for HTTP path 'http://localhost:8111/storefront/': {public java.lang.String com.xxxx.storefront.controllers.pages.HomePageController.home(org.springframework.ui.Model,java.lang .String,javax.servlet.http.HttpServletRequest), public org.springframework.http.HttpEntity org.springframework.data.rest.webmvc.RepositoryController.listRepositories()} at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:711) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1644) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    kidkid
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    37 more bugmates