Announcement Announcement Module
No announcement yet.
Introduction to Spring MVC version 2.5 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Introduction to Spring MVC version 2.5

    I am working through the step by step development of a Spring 2.5 app according to the document spring-mvc-step-by-step.pdf

    In chapter I, I have completed through step 1.12, including successful JUnit tests.

    Now I try to verify by running the app. I get an exception, apparently declaring that it can't find the bean. It says that the springapp-servlet.xml file line 6 is invalid. It matches the one in the pdf. See below:

    Apparently the submission software says these are other url's :-) So, please see attachment. It is really an xml file, but I renamed it to txt to be able to upload it.

    Here is the full error:

    HTTP Status 500 -


    type Exception report


    description The server encountered an internal error () that prevented it from fulfilling this request.


    javax.servlet.ServletException: Servlet.init() for servlet springapp threw exception
    org.apache.catalina.valves.ErrorReportValve.invoke (
    org.apache.catalina.connector.CoyoteAdapter.servic e(
    org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process($

    root cause

    org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 6 in XML document from ServletContext resource [/WEB-INF/springapp-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

    ************************************************** *****

    Any suggestions? Any way to contact the authors? Check errata? Download the current version of springapp?

  • #2
    Well, it may be as simple as this: you have "xsi:schemalocation" in your beans element, rather than "xsi:schemaLocation" (i.e. the L in Location should be uppercase).


    • #3
      Not sure of your specific problem, but whenever I see XML issues that fail on the first line, it usually can't find the file.