Yes. It's bug. External location property seemed to have been broken for
every release. :-(
Fixed in CVS now.
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
[EMAIL PROTECTED]
"Aleksandar
Milanovic" To: <[EMAIL PROTECTED]>
<[EMAIL PROTECTED] cc:
sinc.com> Subject: RE: Bug in 2.3.0?
ClassCastException with ListDV$ListData
01/28/2003 06:58
PM
Please respond to
xerces-j-user
Hi Neil,
We're using JDK 1.4.0. Here's the debug info:
java.lang.ClassCastException: org.apache.xerces.impl.dv.xs.ListDV$ListData
at
org.apache.xerces.impl.xs.XMLSchemaLoader.processExternalHints(XMLSchemaLoad
er.java:567)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.reset(XMLSchemaValidator.java:1
345)
at
org.apache.xerces.parsers.BasicParserConfiguration.reset(BasicParserConfigur
ation.java:543)
at
org.apache.xerces.parsers.DTDConfiguration.reset(DTDConfiguration.java:640)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:512)
at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:595)
at
org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:253)
at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:20
4)
at
com.galdosinc.gds.validator.ValidatorDocumentBuilder.parse(ValidatorDocument
Builder.java:92)
at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:86)
The erroneous use-case is as follows:
An instance document is validated as it is being parsed. We are using
external-schema-location property to specify the URLs of the schemas of
interest. A dummy entity resolver is used to ensure that the schemaLocation
in the instance document is ignored (by returning an empty string).
However,
in this particular case the schemaLocation attribute is not even specified
in the instance document. Schemas are cached in a passive way, i.e. as they
are loaded from the URLs specified in external-schema-location. All schema
locations that appear in schema imports and includes are also valid URLs.
The instance document and all the referenced schemas are valid. This things
works well with previous versions of Xerces (2, 2.1 and 2.2).
Hope this helps. Let me know if you need more details.
Cheers,
Alex
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 28, 2003 2:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Bug in 2.3.0?
>
>
> Hi Alex,
>
> Well, it's possible you've found a bug; I think it's fair to say that the
> xerces-specific schemaLocation properties don't tend to get tested as
well
> as many other aspects of the parser...
>
> I'd recommend two things:
>
> 1. Give us a cut-down test-case that reproduces the problem;
> 2. If you can't do that, then at least recompile Xerces with
> debugging, so
> we at least have line numbers in the stack trace.
>
> Knowing what JDK you're on could also be important.
>
> Cheers,
> Neil
> Neil Graham
> XML Parser Development
> IBM Toronto Lab
> Phone: 905-413-3519, T/L 969-3519
> E-mail: [EMAIL PROTECTED]
>
>
>
>
> |---------+---------------------------->
> | | "Aleksandar |
> | | Milanovic" |
> | | <[EMAIL PROTECTED]|
> | | sinc.com> |
> | | |
> | | 01/28/2003 05:25 |
> | | PM |
> | | Please respond to|
> | | xerces-j-user |
> | | |
> |---------+---------------------------->
>
> >-----------------------------------------------------------------
> ------------------------------------------------------------------
> ----------|
> |
>
> |
> | To: "Xerces-J-User"
> <[EMAIL PROTECTED]>
> |
> | cc:
>
> |
> | Subject: Bug in 2.3.0?
>
> |
> |
>
> |
> |
>
> |
>
> >-----------------------------------------------------------------
> ------------------------------------------------------------------
> ----------|
>
>
>
> Hi,
>
> We tried using Xerces 2.3.0 instead of 2.2.1 and got the following error:
>
> java.lang.ClassCastException:
org.apache.xerces.impl.dv.xs.ListDV$ListData
> at
org.apache.xerces.impl.xs.XMLSchemaLoader.processExternalHints(Unknown
> Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.reset(Unknown Source)
> at org.apache.xerces.parsers.BasicParserConfiguration.reset(Unknown
> Source)
> at org.apache.xerces.parsers.DTDConfiguration.reset(Unknown Source)
> at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
> at org.apache.xerces.parsers.DTDConfiguration.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)
>
> It's a bit confusing that a DTDConfiguration class shows up, because we
> don't use DTDs at all, only XML schemas.
>
> Any clue?
>
> thx
> Alex
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]