cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: random SAXParseException : The declaration for the entity "ContentType" must end with '>'.
Date Tue, 10 Nov 2009 17:43:20 GMT

If you look at the stack trace, it's occurring while trying to load some 
schemas.  My suggestion would be to run wireshark or similar to capture all 
the traffic going in/out of your computer during startup.   My "gut feeling" 
is that it's trying to hit the internet for a schema of some sort and that 
server is returning an invalid xml doc or some error page or something like 
that occasional.  (maybe overloaded?)      If you can figure out what it's 
grabbing, you can copy it locally into your app and add a META-
INF/spring.schemas file to remap it to the local version.

Dan

On Tue November 10 2009 10:38:07 am Thomas Manson wrote:
> Hi,
> 
>   I've build a framework, and then, I expose it's method via webservice
> using CXF (2.2.2).
> 
>   On this project, i've one error that happen quite randomly on project
> start, which complains about a missing > on entity ContentType on line 81,
> when parsing our spring applicationContext.xml.
> 
>   The problem is that our applicationContext.xml has only 48 lines...
> without the CXF part, I never have the problem.
> 
>   If I restart the project right after, it start correctly. If I wait some
> time, I get it again....
> 
>   Does it ring a bell to anyone ?
> 
> Thomas.
> 
> 
> 2009-11-10 16:08:20,869 DEBUG
> fr.rs2i.swFramework.ws.jms.bw.SpringInitializator : BeanFactory init with
> applicationContextFile : '/conf/applicationContext-rs2i.xml'
> 2009-11-10 16:08:20,963 INFO
> org.springframework.context.support.ClassPathXmlApplicationContext :
> Refreshing
> org.springframework.context.support.ClassPathXmlApplicationContext@12b6651:
> display name
> [org.springframework.context.support.ClassPathXmlApplicationContext@12b6651
> ]; startup date [Tue Nov 10 16:08:20 CET 2009]; root of context hierarchy
>  2009-11-10 16:08:21,041 INFO
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader : Loading XML
> bean definitions from class path resource
> [/conf/applicationContext-rs2i.xml]
> Exception in thread "main"
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
> 81 in XML document from class path resource
> [/conf/applicationContext-rs2i.xml] *is invalid; nested exception is
> org.xml.sax.SAXParseException: The declaration for the entity "ContentType"
> must end with '>'.*
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDef
> initions(XmlBeanDefinitionReader.java:404) at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefin
> itions(XmlBeanDefinitionReader.java:342) at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefin
> itions(XmlBeanDefinitionReader.java:310) at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.load
> BeanDefinitions(AbstractBeanDefinitionReader.java:143) at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanD
> efinitions(AbstractXmlApplicationContext.java:109) at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanD
> efinitions(AbstractXmlApplicationContext.java:80) at
> org.springframework.context.support.AbstractRefreshableApplicationContext.r
> efreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshB
> eanFactory(AbstractApplicationContext.java:422) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abst
> ractApplicationContext.java:352) at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(C
> lassPathXmlApplicationContext.java:197) at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(C
> lassPathXmlApplicationContext.java:172) at
> fr.rs2i.swFramework.ws.jms.bw.SpringInitializator.<init>(SpringInitializato
> r.java:48) at
> fr.rs2i.swFramework.ws.jms.bw.SpringInitializator.main(SpringInitializator.
> java:65) *Caused by: org.xml.sax.SAXParseException: The declaration for the
>  entity "ContentType" must end with '>'.*
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseE
> xception(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unkn
> own Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknow
> n Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknow
> n Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanEntityDecl(Un
> known Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSu
> bset(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatche
> r.dispatch(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scan
> Document(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(U
> nknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(U
> nknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchema(
> Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.resolveSch
> ema(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructT
> rees(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.constructT
> rees(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchem
> a(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(Unkno
> wn Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGra
> mmar(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartEl
> ement(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(
> Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartE
> lement(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Frag
> mentContentDispatcher.dispatch(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scan
> Document(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
> Source)
> at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown
> Source)
> at
>  com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown
>  Source)
> at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(De
> faultDocumentLoader.java:75) at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDef
> initions(XmlBeanDefinitionReader.java:396) ... 12 more
> 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Mime
View raw message