Mm_saxparseexception; LineNumber: Unable to find the element ' beans ' declaration. _saxparseexception

Source: Internet
Author: User

warn:org.springframework.beans.factory.xml.xmlbeandefinitionreader#warning:ignored XML Validation Warning
Org.xml.sax.SAXParseException; Linenumber:10; columnnumber:120; SCHEMA_REFERENCE.4: Unable to read the schema document ' Http://www.springframework.org/schema/beans/spring-beans-4.3.xsd ' for 1 because the document could not be found; 2 Unable to read the document; 3 The root element of the document is not.

Error:org.springframework.web.context.contextloader#initwebapplicationcontext:context initialization failed
Org.springframework.beans.factory.parsing.BeanDefinitionParsingException:Configuration problem:failed to Import bean definitions from URL location [Classpath:/spring-rabbit.xml]
Offending resource:class path resource [app Licationcontext.xml]; Nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:Line the XML document from Class path resource [Spring-rabbit.xml] is invalid; Nested exception is org.xml.sax.SAXParseException; Linenumber:10; columnnumber:120; Cvc-elt.1: Unable to find the element ' beans ' declaration.

warn:org.springframework.beans.factory.xml.xmlbeandefinitionreader#warning:ignored XML Validation Warning Org.xml.sax.SAXParseException; Linenumber:10; columnnumber:120; SCHEMA_REFERENCE.4: Unable to read the schema document ' Http://www.springframework.org/schema/beans/spring-beans-4.3.xsd ' for 1 because the document could not be found; 2 Unable to read the document;
    3 The root element of the document is not <xsd:schema>. At Com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException (Errorhandlerwrapper.java : 203) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning (errorhandlerwrapper.java:99) at COM.S Un.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:392) at Com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:306) at COM.SUN.ORG.APACHE.XERCES.INTERNAL.IMPL.XS.TRAVERSERS.XSDHANDLER.REPORTSCHEMAERR (xsdhandler.java:4162) at Com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning (xsdhandler.java:4153) at Com.sun. Org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1 (xsdhandler.java:2486) at Com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument (xsdhandler.java:2183) at Com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema (xsdhandler.java:569) at Com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema (xmlschemaloader.java:613) at
    Com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar (xmlschemavalidator.java:2446) At Com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement (Xmlschemavalidator.java : 1767) at Com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement (xmlschemavalidator.java:740 ) at Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement ( xmlnsdocumentscannerimpl.java:380) at com.sun.org.apache.xerces.internal.impl.xmlnsdocumentscannerimpl$ Nscontentdriver.scanrootelementhook (XMLnsdocumentscannerimpl.java:614) at com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl$ Fragmentcontentdriver.next (xmldocumentfragmentscannerimpl.java:3135) at Com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$prologdriver.next (XMLDocumentScannerImpl.java : 880) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (xmldocumentscannerimpl.java:606) at C Om.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next (xmlnsdocumentscannerimpl.java:118) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument ( xmldocumentfragmentscannerimpl.java:510) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( xml11configuration.java:848) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (  xml11configuration.java:777) at Com.sun.org.apache.xerces.internal.parsers.XMLParser.parse (xmlparser.java:141) at Com.sun.org.apache.xerces.internal.parsers.DOMPArser.parse (domparser.java:243) at Com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse ( documentbuilderimpl.java:339) at Org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument ( DEFAULTDOCUMENTLOADER.JAVA:75) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions ( xmlbeandefinitionreader.java:388) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (Xmlbeandefinitionreader.java : 334) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions ( xmlbeandefinitionreader.java:302) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:174) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:209) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(defaultbeandefinitiondocumentreader.java:250) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement ( defaultbeandefinitiondocumentreader.java:207) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions ( defaultbeandefinitiondocumentreader.java:192) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions ( defaultbeandefinitiondocumentreader.java:139) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions ( defaultbeandefinitiondocumentreader.java:108) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions ( xmlbeandefinitionreader.java:493) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions ( xmlbeandefinitionreader.java:390) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (Xmlbeandefinitionreader.java:334) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions ( xmlbeandefinitionreader.java:302) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:174) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:209) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:180) at Org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions ( xmlwebapplicationcontext.java:125) at Org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions ( xmlwebapplicationcontext.java:94) at Org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory ( abstractrefreshableapplicationcontext.java:130) at ORG.SPRINGFRAMEWORK.CONTEXT.SUPPORT.ABstractapplicationcontext.obtainfreshbeanfactory (abstractapplicationcontext.java:537) at Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:451) at
    Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:410) At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:306) at Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:112) at Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4811) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5251) at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:147) at org.apache.catalina.core.containerbase$ Startchild.call (containerbase.java:1408) at Org.apache.catalina.core.containerbase$startchild.call ( containerbase.java:1398) at Java.util.concurrent.FutureTask. Run (futuretask.java:266) at Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1142) at Ja Va.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:617) at Java.lang.Thread.run ( thread.java:745) caused by:java.net.ConnectException:Connection timed out:connect at Java.net.DualStackPlainSocketI Mpl.connect0 (Native method) at Java.net.DualStackPlainSocketImpl.socketConnect (dualstackplainsocketimpl.java:79) A T Java.net.AbstractPlainSocketImpl.doConnect (abstractplainsocketimpl.java:350) at Java.net.AbstractPlainSocketImpl.connectToAddress (abstractplainsocketimpl.java:206) at Java.net.AbstractPlainSocketImpl.connect (abstractplainsocketimpl.java:188) at Java.net.PlainSocketImpl.connect ( plainsocketimpl.java:172) at Java.net.SocksSocketImpl.connect (sockssocketimpl.java:392) at Java.net.Socket.connect (socket.java:589) at Java.net.Socket.connect (socket.java:538) at Sun.net.NetworkClient.doConnect (NETWORKCLient.java:180) at Sun.net.www.http.HttpClient.openServer (httpclient.java:432) at Sun.net.www.http.HttpClient.openS Erver (httpclient.java:527) at sun.net.www.http.httpclient.<init> (httpclient.java:211) at sun.net.www.http.Ht Tpclient.new (httpclient.java:308) at the Sun.net.www.http.HttpClient.New (httpclient.java:326) at Sun.net.www.protocol. http. Httpurlconnection.getnewhttpclient (httpurlconnection.java:1169) at Sun.net.www.protocol.http.HttpURLConnection.plainConnect0 (httpurlconnection.java:1105) at Sun.net.www.protocol.http.HttpURLConnection.plainConnect (httpurlconnection.java:999) at Sun.net.www.protocol.http.HttpURLConnection.connect (httpurlconnection.java:933) at Sun.net.www.protocol.http.HttpURLConnection.getInputStream0 (httpurlconnection.java:1513) at Sun.net.www.protocol.http.HttpURLConnection.getInputStream (httpurlconnection.java:1441) at Com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity (XMLENTITYMANAGER.Java:647) at Com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion ( xmlversiondetector.java:189) at Com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse ( schemaparsingconfig.java:582) at Com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse ( schemaparsingconfig.java:685) at Com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse ( schemadomparser.java:530) at Com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument ( xsdhandler.java:2171) Error:org.springframework.web.context.contextloader#initwebapplicationcontext:context Initialization failed Org.springframework.beans.factory.parsing.BeanDefinitionParsingException:Configuration  problem:failed to import beans definitions from URL location [classpath:/spring-rabbit.xml] offending Resource:class path resource [Applicationcontext.xml]; Nested exception is Org.springframework.beans.factory.xml.XmlBeanDefinitionStoReexception:line in XML document from class path resource [Spring-rabbit.xml] is invalid; Nested exception is org.xml.sax.SAXParseException; Linenumber:10; columnnumber:120;
    Cvc-elt.1: Unable to find the element ' beans ' declaration. At Org.springframework.beans.factory.parsing.FailFastProblemReporter.error (failfastproblemreporter.java:68) at Org.springframework.beans.factory.parsing.ReaderContext.error (readercontext.java:85) at Org.springframework.beans.factory.parsing.ReaderContext.error (readercontext.java:76) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource ( DEFAULTBEANDEFINITIONDOCUMENTREADER.JAVA:256) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement ( defaultbeandefinitiondocumentreader.java:207) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions ( defaultbeandefinitiondocumentreader.java:192) at ORG.SPRINGFRAMEWORK.BEANS.FACTORY.XML.defaultbeandefinitiondocumentreader.doregisterbeandefinitions (defaultbeandefinitiondocumentreader.java:139) At Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions ( defaultbeandefinitiondocumentreader.java:108) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions ( xmlbeandefinitionreader.java:493) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions ( xmlbeandefinitionreader.java:390) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (Xmlbeandefinitionreader.java : 334) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions ( xmlbeandefinitionreader.java:302) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:174) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions (Abstractbeandefinitionreader.java:209) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:180) at Org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions ( xmlwebapplicationcontext.java:125) at Org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions ( xmlwebapplicationcontext.java:94) at Org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory ( abstractrefreshableapplicationcontext.java:130) at Org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory ( abstractapplicationcontext.java:537) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:451) at
    Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:410) At Org.springframework.web.context.ContextLoader.initWebApplicAtioncontext (contextloader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:112) at Org.apache.catalina.core.StandardContext.listenerStart (Standardcontext.java : 4811) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5251) at Org.apache.catalina . util. Lifecyclebase.start (lifecyclebase.java:147) at Org.apache.catalina.core.containerbase$startchild.call ( containerbase.java:1408) at Org.apache.catalina.core.containerbase$startchild.call (ContainerBase.java:1398) at JAV A.util.concurrent.futuretask.run (futuretask.java:266) at Java.util.concurrent.ThreadPoolExecutor.runWorker (
    threadpoolexecutor.java:1142) at Java.util.concurrent.threadpoolexecutor$worker.run (ThreadPoolExecutor.java:617) At Java.lang.Thread.run (thread.java:745) caused by: Org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:Line in XML document from class path resource [Spring-rAbbit.xml] is invalid; Nested exception is org.xml.sax.SAXParseException; Linenumber:10; columnnumber:120;
    Cvc-elt.1: Unable to find the element ' beans ' declaration. At Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions ( xmlbeandefinitionreader.java:396) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (Xmlbeandefinitionreader.java : 334) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions ( xmlbeandefinitionreader.java:302) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:174) at Org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions ( abstractbeandefinitionreader.java:209) at Org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource ( DEFAULTBEANDEFINITIONDOCUMENTREADER.JAVA:250) ... more caused by:org.xml.sax.SAXParseException; LiNenumber:10; columnnumber:120;
    Cvc-elt.1: Unable to find the element ' beans ' declaration. At Com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException (Errorhandlerwrapper.java : 203) at Com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error (errorhandlerwrapper.java:134) at com.su N.org.apache.xerces.internal.impl.xmlerrorreporter.reporterror (xmlerrorreporter.java:396) at Com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:327) at Com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:284) at
    Com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement (xmlschemavalidator.java:1900) At Com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement (xmlschemavalidator.java:740) at Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement ( xmlnsdocumentscannerimpl.java:380) at Com.sun.org.apache.xerces.internal.impl.XMLNSdocumentscannerimpl$nscontentdriver.scanrootelementhook (xmlnsdocumentscannerimpl.java:614) at Com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl$fragmentcontentdriver.next ( xmldocumentfragmentscannerimpl.java:3135) at com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$ Prologdriver.next (xmldocumentscannerimpl.java:880) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (xmldocumentscannerimpl.java:606) at Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next (xmlnsdocumentscannerimpl.java:118) at Com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument ( xmldocumentfragmentscannerimpl.java:510) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( xml11configuration.java:848) at Com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse ( xml11configuration.java:777) at Com.sun.org.apache.xerces.internal.parsers.XMLParser.parse (Xmlparser.java: Com.sun.org.apache.xerces.internal.parsers.DOMParser.parse (domparser.java:243) at Com.sun.org.apache.xerc Es.internal.jaxp.DocumentBuilderImpl.parse (documentbuilderimpl.java:339) at Org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument (defaultdocumentloader.java:75) at Org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions (

 xmlbeandefinitionreader.java:388)

Problem Description: Update the project, the start of the project can start normally, and later put Tomcat
Clean, the above error occurred

Problem handling:

Http://www.springframework.org/schema/beans/spring-beans-4.3.xsd

modified to

http://www.springframework.org/ Schema/beans/spring-beans-2.5.xsd

Problem reason: The JDK version and spring version need attention
In the beginning Jdk7 spring-beans-4.3.xsd also can run normally ...
And finally, Jdk7 spring-beans-2.5.xsd.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.