You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Giacomo Picconi <wo...@gpstudio.com> on 2001/01/19 12:45:40 UTC

Problems running DOMCount -v with xerces 1.2.3

Hello list, this is my first time here.
I have downloaded xerces 1.2.3.
I have compiled DOMCount.java successfully.
Generated DOMCount.class generate errors with the
-v option (validation enabled), and works correctly without
the -v option.
I use jdk 1.2.
The xml file that generate the error is data/personal-schema.xml (that
comes with the xerces package).
The schema file is data/personal.xsd  (that comes with the xerces package).

This is the error:

E:\TEMP>java dom.DOMCount -v data\personal-schema.xml
Exception in thread "main" java.lang.NoSuchMethodError:
org.w3c.dom.Document: me
thod
createElementNS(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Element;
not found
        at org.apache.xerces.parsers.DOMParser.startElement(DOMParser.java,
Comp
iled Code)
        at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
Validator.java, Compiled Code)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java, Compiled Code)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java, Compiled Code)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
        at
org.apache.xerces.validators.common.XMLValidator.resolveSchemaGrammar
(XMLValidator.java:2058)
        at
org.apache.xerces.validators.common.XMLValidator.bindNamespacesToElem
entAndAttributes(XMLValidator.java, Compiled Code)
        at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XML
Validator.java, Compiled Code)
        at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
tScanner.java, Compiled Code)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java, Compiled Code)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java, Compiled Code)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:861)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
        at dom.wrappers.DOMParser.parse(DOMParser.java:111)
        at dom.DOMCount.count(DOMCount.java:135)
        at dom.DOMCount.main(DOMCount.java, Compiled Code)

E:\TEMP>


and, if I don't use the -v option, everything work:


E:\TEMP>java dom.DOMCount data\personal-schema.xml
personal-schema.xml: 3264 ms (37 elems, 14 attrs, 0 spaces, 268 chars)

E:\TEMP>

---------------------------------
WHAT'S WRONG ????
---------------------------------

Thank you.
Giacomo Picconi
wolf@gpstudio.com



Re: Problems running DOMCount -v with xerces 1.2.3

Posted by Giacomo Picconi <wo...@gpstudio.com>.
Yes, that was the problem. Thank you.

Giacomo Picconi

At 01:04 PM 1/22/01 +0000, you wrote:
>Is xerces.jar the first jar file in your classpath?  It looks like there's
>another class which implements the DOM interfaces somewhere ahead of
>xerces in the classpath, and it doesn't support the newer DOM calls like
>createElementNS.  Try it again with xerces.jar as the first classpath
>entry.
>
>Ian
>
>--
>Ian Roberts                     | irr@decisionsoft.com
>DecisionSoft Ltd.               | http://www.decisionsoft.com/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: Problems running DOMCount -v with xerces 1.2.3

Posted by Ian Roberts <ir...@decisionsoft.com>.
Is xerces.jar the first jar file in your classpath?  It looks like there's
another class which implements the DOM interfaces somewhere ahead of
xerces in the classpath, and it doesn't support the newer DOM calls like
createElementNS.  Try it again with xerces.jar as the first classpath
entry.

Ian

-- 
Ian Roberts                     | irr@decisionsoft.com
DecisionSoft Ltd.               | http://www.decisionsoft.com/