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 Giana Marco <m....@synergis.co.at> on 2003/08/28 10:17:22 UTC

xmlParserAPIs.jar and parser.jar

Hi all,

this is more a general Java question, but it is associated with Xerces.

I am currently writing library of classes to obviously process some XML
documents, using jdk1.3.1_01.

I have places the necessary jar files in jdk1.3.1_01\jre\lib\ext to be able
to compile and run.
The machines which will use this also contain parser.jar in this directory.
When I go to compile the classes I get the following error,

mapbroker/MBXML.java:97: cannot resolve symbol
symbol  : method createDocument  (java.lang.String,java.lang.String,<null>)
location: interface org.w3c.dom.DOMImplementation
        Document subDocument = domImpl.createDocument("", "roottagname",
null);

Now when I remove parser.jar, everything compiles and runs without a
problem.
This leads me to believe that cause both jar files contain the
org.w3c.dom.DOMImplementation, then the JVM cannot resolve which one to use.
Now I thought depending on which order these are loaded in the classpath,
then it will use the first. It seems to me placing the jars in \jre\lib\ext
does not do this. Well it is more of a case that I do not really understand
what happens to these files when java application starts.

So my question is how can I have both of these files in \jre\lib\ext and
have java resolve it.

Also this will be run as both for a stand alone application, which is where
I have encountered this problem, and as a web application.
using ServletExec. I have not done any test for the web application, but I
suppose I could add the xmlParserAPIs.jar
to the Java Virtual Machine (VM) Classpath, which should resolve this
problem for my web application.
Regards
Marco Giana



___________________________________________________________
Marco Giana
mailto:m.giana@synergis.co.at
WebGIS-Entwicklung                                       Phone:++43 1 87806
ext. 49
SynerGIS Informationssysteme GmbH                   Fax:++43 1 87806 ext. 98
Amalienstrasse 65
A-1130 Wien
http://www.synergis.co.at
___________________________________________________________

18. European ESRI User Conference Oct 8-10, Innsbruck
10. Deutschsprachige ESRI Anwenderkonferenz 8.-10.10. Innsbruck
GIS @ Work http://www.esri2003.info


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: xmlParserAPIs.jar and parser.jar

Posted by Jacob Kjome <ho...@visi.com>.
What's "parser.jar"?  You should have xmlParserAPIs.jar (or xml-apis.jar) 
and xercesImpl.jar.

Jake

At 10:17 AM 8/28/2003 +0200, you wrote:
>Hi all,
>
>this is more a general Java question, but it is associated with Xerces.
>
>I am currently writing library of classes to obviously process some XML
>documents, using jdk1.3.1_01.
>
>I have places the necessary jar files in jdk1.3.1_01\jre\lib\ext to be able
>to compile and run.
>The machines which will use this also contain parser.jar in this directory.
>When I go to compile the classes I get the following error,
>
>mapbroker/MBXML.java:97: cannot resolve symbol
>symbol  : method createDocument  (java.lang.String,java.lang.String,<null>)
>location: interface org.w3c.dom.DOMImplementation
>         Document subDocument = domImpl.createDocument("", "roottagname",
>null);
>
>Now when I remove parser.jar, everything compiles and runs without a
>problem.
>This leads me to believe that cause both jar files contain the
>org.w3c.dom.DOMImplementation, then the JVM cannot resolve which one to use.
>Now I thought depending on which order these are loaded in the classpath,
>then it will use the first. It seems to me placing the jars in \jre\lib\ext
>does not do this. Well it is more of a case that I do not really understand
>what happens to these files when java application starts.
>
>So my question is how can I have both of these files in \jre\lib\ext and
>have java resolve it.
>
>Also this will be run as both for a stand alone application, which is where
>I have encountered this problem, and as a web application.
>using ServletExec. I have not done any test for the web application, but I
>suppose I could add the xmlParserAPIs.jar
>to the Java Virtual Machine (VM) Classpath, which should resolve this
>problem for my web application.
>Regards
>Marco Giana
>
>
>
>___________________________________________________________
>Marco Giana
>mailto:m.giana@synergis.co.at
>WebGIS-Entwicklung                                       Phone:++43 1 87806
>ext. 49
>SynerGIS Informationssysteme GmbH                   Fax:++43 1 87806 ext. 98
>Amalienstrasse 65
>A-1130 Wien
>http://www.synergis.co.at
>___________________________________________________________
>
>18. European ESRI User Conference Oct 8-10, Innsbruck
>10. Deutschsprachige ESRI Anwenderkonferenz 8.-10.10. Innsbruck
>GIS @ Work http://www.esri2003.info
>
>
>---------------------------------------------------------------------
>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