WAS下org.xml.sax.SAXParseException: cvc-elt.1:找不到元素“beans”的声明

错误堆栈:

Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 4 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1:找不到元素“beans”的声明。

atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)

atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)

atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)

atorg.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:190)

...44more

Causedby:org.xml.sax.SAXParseException:cvc-elt.1:找不到元素“beans”的声明。

atorg.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(UnknownSource)

atorg.apache.xerces.util.ErrorHandlerWrapper.error(UnknownSource)

atorg.apache.xerces.impl.XMLErrorReporter.reportError(UnknownSource)

atorg.apache.xerces.impl.XMLErrorReporter.reportError(UnknownSource)

atorg.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(UnknownSource)

atorg.apache.xerces.impl.xs.XMLSchemaValidator.startElement(UnknownSource)

atorg.apache.xerces.impl.dtd.XMLDTDValidator.startElement(UnknownSource)

atorg.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(UnknownSource)

atorg.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(UnknownSource)

atorg.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(UnknownSource)

atorg.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(UnknownSource)

atorg.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)

atorg.apache.xerces.parsers.XML11Configuration.parse(UnknownSource)

atorg.apache.xerces.parsers.XMLParser.parse(UnknownSource)

atorg.apache.xerces.parsers.DOMParser.parse(UnknownSource)

atorg.apache.xerces.jaxp.DocumentBuilderImpl.parse(UnknownSource)

atorg.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)

    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)

解决办法:

通过加JVM参数-Dibm.stream.nio=true解决,该问题在6.1.0.23上出现,在6.1.0.29未出现。

相关推荐