Might Help Tip

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 5 in XML document from class path resource [test-jdbc-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ‘beans’.

Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ‘beans’.

This happens as a result of using the older version of spring framework while the DTD in the xml files point to a newer version. For example if you have spring.jar of lets say spring 2.0.8 while the xml file points to spring-beans-2.5.xsd

Leave a Reply