Symptom: Spring load config file applicationcontext.xml error, throw nested exception is og.xml.sax.SAXParseException; linenumber:12; columnnumber:47; Cvc-elt.1: Could not find exception information for the declaration r of element ' beans ' .
There are two causes of this exception: first, the configuration file header configuration of the XSD version information is incorrect, resulting in an error parsing. Spring header xsd or DTD check files are found in two steps, first from the local jar package, If found, then verify with the local jar package (you can find the definition of the XSD file location in the Spring-schemas file under Meta-inf in Spring-beans.jar or Spring-context.jar), and if not found, second-step lookup, it will try to get from the network Download the file and verify that the above exception is thrown if the system is disconnected or downloaded. Workaround: Change the version of the XSD file defined in Applicationcontext.xml to the version of XSD defined in the Spring jar package. If the version definition is too high, it cannot be found locally and can only be downloaded from the network. For example, my spring jar package is 3.0.5 version, but my XSD write is 3.2, sometimes if the system is disconnected or downloaded will be reported this problem, the 3.2 changed to 3.0 to solve. Second, this problem can also occur in the absence of xmlns= "Http://www.springframework.org/schema/beans" in the DTD. Workaround: Add xmlns= "Http://www.springframework.org/schema/beans in the spring configuration file to resolve.
Spring profile parsing failed at system startup, "Cvc-elt.1: Cannot find the declaration of element ' Beans ' exception