`
jarchitect
  • 浏览: 34502 次
  • 性别: Icon_minigender_1
  • 来自: GuangZhou
社区版块
存档分类
最新评论

Spring疑难杂症 - XML配置(2)-cvc-complex-type.2.4.a

阅读更多

 

问题:

org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'processor-ref'.  

 

解决办法:

未解决

异常完整信息:

Jan 22, 2008 11:19:43 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh 
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@291aff: display name [org.springframework.context.support.ClassPathXmlApplicationContext@291aff]; startup date [Tue Jan 22 11:19:43 CST 2008]; root of context hierarchy 
Jan 22, 2008 11:19:43 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from class path resource [es6message/ism12/ism12.xml] 
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 32 in XML document from class path resource [es6message/ism12/ism12.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'processor-ref'. One of '{"http://www.hsbc.com/schema/esrp":event-mapping, "http://www.hsbc.com/schema/esrp":event-mapping-ref}' is expected. 
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'processor-ref'. One of '{"http://www.hsbc.com/schema/esrp":event-mapping, "http://www.hsbc.com/schema/esrp":event-mapping-ref}' is expected. 
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.XMLErrorReporter.reportError(Unknown Source) 
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) 
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) 
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) 
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) 
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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:76) 
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:351) 
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303) 
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280) 
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131) 
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147) 
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:173) 
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112) 
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79) 
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101) 
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:389) 
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:324) 
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91) 
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75) 
at com.hsbc.pfs.gbl.message.ES6XmlMessageTest.main(ES6XmlMessageTest.java:30) 

 

分享到:
评论
3 楼 baolong101010 2012-10-24  
我给你提个醒:
你的es6message/ism12/ism12.xml,这个文件中的'processor-ref'是不存在的,schema中"http://www.hsbc.com/schema/esrp",只有两种标签是合法的:event-mapping,event-mapping-ref。但是你却写了个'processor-ref',所以在解析xml的时候报错了。
2 楼 baolong101010 2012-10-24  
标题党,鄙死你!
1 楼 grizzly 2010-04-19  
给个解决方案啊啊,等着咧。。。

相关推荐

Global site tag (gtag.js) - Google Analytics