Hi Brett, This sounds like a classpath problem to me. Be careful not to mix jars from the standard distribution and DOM Level 3 distribution of Xerces 2.6.2. The standard distribution of Xerces 2.6.2 doesn't support DOM Level 3. So that the DOM Level 2 and 3 implementations could co-exist with each other some packages get renamed during the DOM Level 3 build. In the standard distribution org.apache.xerces.dom.DOMXSImplementationSourceImpl implements org.apache.xerces.dom3.DOMImplementationSource rather than org.w3c.dom.DOMImplementationSource which could explain why you're getting a ClassCastException.
Thanks. Brett McLaughlin <[EMAIL PROTECTED]> wrote on 05/30/2005 08:36:58 PM: > Is anyone having trouble with the DOM3 implementation in Xerces > 2.6.2 (using either the standard release, or the beta API release)? > Specifically, this line of code: > > System.setProperty > (DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom.DOMXSImplemen > tationSourceImpl"); > > --causes this error: > > java.lang.ClassCastException: > org.apache.xerces.dom.DOMXSImplementationSourceImpl > at > org.w3c.dom.bootstrap.DOMImplementationRegistry.newInstance > (DOMImplementationRegistry.java:144) > at javaxml3.LSTester.main(LSTester.java:26) > > I'm happy to chase this down in the source code if I need to, but > I'd rather at least see if someone else has figured this out first. > The code, of course compiles fine, but then bombs on execution. This > happens with my own code, or using the dom.DOM3 sample class > unchanged from the Xerces distro. Any help or comments appreciated. > Since this -- the DOMImplementationRegistry -- is a pretty core part > of DOM Level 3, I would expect this to be a pretty significant issue. > > > Thanks > --- > Brett McLaughlin <brett-at-newInstance.com> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
