Hi,

I have code with the line:
  element.setIdAttribute(ID, true);
where element is an instance of org.w3c.dom.NodeList and the base document
was created via javax.xml.parsers.DocumentBuilderFactory.newInstance() \
.newDocumentBuilder().newDocument()

This gives the error:
  java.lang.AbstractMethodError:
    org.apache.xerces.dom.ElementImpl.setIdAttribute(Ljava/lang/String;Z)V

I am using Java 1.5.0_04-b05 (JAXP 1.3; Xerces-J 2.6.2) on Suse 9.3.

After some investigation it seems that this only happens when Xerces 2.0.2
appears on the classpath.  This is true even if I explcitly include (in
addition to 2.0.2) Xerces 2.6.2 (rather than relying on JAXP) and use
  -Dorg.apache.xerces.xni.parser.XMLParserConfiguration=
    org.apache.xerces.parsers.StandardParserConfiguration

Questions:
- Is there any way to avoid this error *without* cleaning old versions of
Xerces out of the claspath?
- And is cleaning old versions of Xerces out of the classpath guaranteed
to fix this?

We deploy code in rather complex environments (JBoss and Mule/Spring) and
use Maven to package all dependencies, so excluding jars is not going to
be trivial.  If there is a way to configure my code to work without doing
this, I would appreciate knowing how.

I thought this would be a FAQ, but apart from the XMLParserConfiguration
setting couldn't find anything relevant on the web site.  Apologies if I
missed something.

Thanks,
Andrew



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to