首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

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

2012-10-27 
WAS下org.xml.sax.SAXParseException: cvc-elt.1:找不到元素“beans”的声明错误堆栈:Caused by: org.spring

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”的声明。
??? at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
??? at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
??? at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
??? at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:190)
??? ... 44 more
Caused by: org.xml.sax.SAXParseException: cvc-elt.1:找不到元素“beans”的声明。
??? at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
??? at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
??? at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
??? at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
??? at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
??? at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
??? at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
??? at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
??? at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
??? at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
??? at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
??? at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
??? at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
??? at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
??? at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
??? at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
??? at org.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未出现。

1 楼 cuiran 2011-10-31   你好,我是在有tomcat6.0往was 6.1移植时候 后台提示 这些 +++ Warning +++: Mon Oct 31 13:04:05 CST 2011    org.xml.sax.SAXParseException: schema_reference.4:读取模式文档“http://java.sun.com/xml/ns/javaee/application_5.xsd”失败,因为 1)找不到文档;2)无法读取文档;3)文档根元素不是 <xsd:schema>。  你当时怎么解决的。

热点排行