Sep 13th, 2008, 04:31 PM
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.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?
Sep 14th, 2008, 08:41 PM
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).
Sep 15th, 2008, 03:29 PM
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.
Tags for this Thread