Announcement Announcement Module
Collapse
No announcement yet.
Introduction to Spring MVC version 2.5 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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

    message

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

    exception

    javax.servlet.ServletException: Servlet.init() for servlet springapp threw exception
    org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:286)
    org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:844)
    org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:583)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:447)
    java.lang.Thread.run(Thread.java:595)


    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).

    Comment


    • #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.

      Comment

      Working...
      X