You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Mark Lines-Davies <ml...@spd.sonybpe.com> on 2002/01/14 12:41:46 UTC
ClassCastException in DOMParser
Hello all
I'm getting a ClassCastException in the parse() method at line 270 in
DOMParser. I'm using Xerces 2.
To find out more, I subclassed DOMParser, cut-and-pasted the parse() method
into my subclass, then changed the catch blocks to a single "catch
(Exception)" block. Doing this pointed me to the parse() method at line 572
of StandardParserConfiguration.
I subclassed StandardParserConfiguration to make a temporary version of this
parse method, and removed all the catch blocks. The resulting stack trace is
shown below.
I couldn't see anything in the mailing lists about this, so I thought I'd
ask for help. Help!
regards
Mark Lines-Davies
java.lang.ClassCastException: org.apache.xerces.impl.xs.XSComplexTypeDecl
at
org.apache.xerces.impl.xs.traversers.XSDSimpleTypeTraverser.findDTVal
idator(XSDSimpleTypeTraverser.java:530)
at
org.apache.xerces.impl.xs.traversers.XSDSimpleTypeTraverser.traverseS
impleTypeDecl(XSDSimpleTypeTraverser.java:327)
at
org.apache.xerces.impl.xs.traversers.XSDSimpleTypeTraverser.traverseL
ocal(XSDSimpleTypeTraverser.java:155)
at
org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseName
dElement(XSDElementTraverser.java:328)
at
org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLoca
l(XSDElementTraverser.java:188)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements
(XSDHandler.java:1174)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandle
r.java:371)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.parseSchemas(XMLSchemaVa
lidator.java:1699)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSc
hemaValidator.java:1280)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaVa
lidator.java:511)
at
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNames
paceBinder.java:830)
at
org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBi
nder.java:566)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidat
or.java:786)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(XMLDocumentFragmentScannerImpl.java:751)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
ootElementHook(XMLDocumentScannerImpl.java:935)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1514)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:332)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardP
arserConfiguration.java:510)
at
com.sony.antenne.ValidatingParserConfiguration.parse(ValidatingParser
Configuration.java:27)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148)
at com.sony.antenne.ValidatingParser.parse(ValidatingParser.java:58)
at com.sony.antenne.ValidatingParser.parse(ValidatingParser.java:69)
at com.sony.antenne.Schema.validate(Schema.java:34)
at com.sony.antenne.InboundMessage.validate(InboundMessage.java:43)
at com.sony.antenne.InboundMessage.process(InboundMessage.java:31)
*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
RE: ClassCastException in DOMParser
Posted by Mark Lines-Davies <ml...@spd.sonybpe.com>.
The problem appears to be an <xsd:union> element in my XSD. If I take this
out, the problem disappears.
I guess this is a bug...?
regards
Mark Lines-Davies
-----Original Message-----
From: Mark Lines-Davies [mailto:mld@spd.sonybpe.com]
Sent: 14 January 2002 11:42
To: xerces-j-user@xml.apache.org
Subject: ClassCastException in DOMParser
Hello all
I'm getting a ClassCastException in the parse() method at line 270 in
DOMParser. I'm using Xerces 2.
To find out more, I subclassed DOMParser, cut-and-pasted the parse() method
into my subclass, then changed the catch blocks to a single "catch
(Exception)" block. Doing this pointed me to the parse() method at line 572
of StandardParserConfiguration.
I subclassed StandardParserConfiguration to make a temporary version of this
parse method, and removed all the catch blocks. The resulting stack trace is
shown below.
I couldn't see anything in the mailing lists about this, so I thought I'd
ask for help. Help!
regards
Mark Lines-Davies
java.lang.ClassCastException: org.apache.xerces.impl.xs.XSComplexTypeDecl
at
org.apache.xerces.impl.xs.traversers.XSDSimpleTypeTraverser.findDTVal
idator(XSDSimpleTypeTraverser.java:530)
at
org.apache.xerces.impl.xs.traversers.XSDSimpleTypeTraverser.traverseS
impleTypeDecl(XSDSimpleTypeTraverser.java:327)
at
org.apache.xerces.impl.xs.traversers.XSDSimpleTypeTraverser.traverseL
ocal(XSDSimpleTypeTraverser.java:155)
at
org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseName
dElement(XSDElementTraverser.java:328)
at
org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLoca
l(XSDElementTraverser.java:188)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements
(XSDHandler.java:1174)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandle
r.java:371)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.parseSchemas(XMLSchemaVa
lidator.java:1699)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSc
hemaValidator.java:1280)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaVa
lidator.java:511)
at
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNames
paceBinder.java:830)
at
org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBi
nder.java:566)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidat
or.java:786)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
t(XMLDocumentFragmentScannerImpl.java:751)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanR
ootElementHook(XMLDocumentScannerImpl.java:935)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1514)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
LDocumentFragmentScannerImpl.java:332)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardP
arserConfiguration.java:510)
at
com.sony.antenne.ValidatingParserConfiguration.parse(ValidatingParser
Configuration.java:27)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148)
at com.sony.antenne.ValidatingParser.parse(ValidatingParser.java:58)
at com.sony.antenne.ValidatingParser.parse(ValidatingParser.java:69)
at com.sony.antenne.Schema.validate(Schema.java:34)
at com.sony.antenne.InboundMessage.validate(InboundMessage.java:43)
at com.sony.antenne.InboundMessage.process(InboundMessage.java:31)
*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org