Results 1 to 4 of 4

Thread: NoSuchElementException while trying to access any page

  1. #1
    Join Date
    Jan 2006
    Location
    South Africa, Cape Town
    Posts
    11

    Default NoSuchElementException while trying to access any page

    Hi,

    I updated from Spring 3.0.6 to Spring 3.1 RC1 and now cannot access any page. I get the exception below. Nothing has changed in my configuration since I copied the new Spring jars. I have a suspicion that it is related to some handler mappings but do not know were to start looking into this. It seems that something is not backwards compatible in Spring 3.1.
    Any hint how to get to the bottom of this is greatly appreciated.


    java.util.NoSuchElementException
    at java.util.LinkedHashMap$LinkedHashIterator.nextEnt ry(Unknown Source)
    at java.util.LinkedHashMap$KeyIterator.next(Unknown Source)
    at java.util.Collections$UnmodifiableCollection$1.nex t(Unknown Source)
    at org.springframework.web.servlet.mvc.method.Request MappingInfoHandlerMapping.handleMatch(RequestMappi ngInfoHandlerMapping.java:88)
    at org.springframework.web.servlet.mvc.method.Request MappingInfoHandlerMapping.handleMatch(RequestMappi ngInfoHandlerMapping.java:1)
    at org.springframework.web.servlet.handler.AbstractHa ndlerMethodMapping.lookupHandlerMethod(AbstractHan dlerMethodMapping.java:254)
    at org.springframework.web.servlet.handler.AbstractHa ndlerMethodMapping.getHandlerInternal(AbstractHand lerMethodMapping.java:194)
    at org.springframework.web.servlet.handler.AbstractHa ndlerMethodMapping.getHandlerInternal(AbstractHand lerMethodMapping.java:1)
    at org.springframework.web.servlet.handler.AbstractHa ndlerMapping.getHandler(AbstractHandlerMapping.jav a:288)
    at org.springframework.web.servlet.DispatcherServlet. getHandler(DispatcherServlet.java:1040)
    at org.springframework.web.servlet.DispatcherServlet. getHandler(DispatcherServlet.java:1025)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:863)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:827)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:874)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:779)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)

  2. #2
    Join Date
    Dec 2010
    Posts
    315

    Default

    Probably there are dependencies from 3.0.6 that are no longer used in 3.1.

    Did you copy the files manually or are you using a build tool like Maven?

  3. #3
    Join Date
    Jan 2006
    Location
    South Africa, Cape Town
    Posts
    11

    Default

    Hi Skram

    I copied the Spring jars into my web app's lib folder and this broke it.

  4. #4
    Join Date
    Jan 2006
    Location
    South Africa, Cape Town
    Posts
    11

    Default

    I solved my own case. One of my colleagues created an annotation based edit controller and in addition mapped it in the someApp-servlet.xml. As we have hundreds of controllers, services, etc. it was quite difficult to find out that this.

    <bean name="/policyWordingEdit.htm" class="foo.subfoo.PolicyWordingEditController">

    @Controller("policyWordingEditController")
    public class PolicyWordingEditController {


    It is quite rough that Spring does not throw an easier to understand exception. It was not clear initially that this actually came from a simple setup mistake in someApp-servlet.xml. What is weird is that this mistake was tolerated by Spring 3.0 and threw in 3.1 RC1 a rather not understandable exception.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •