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 Nate McFeters <nm...@yahoo.com> on 2003/11/08 02:28:05 UTC

Serious problems getting Xerces to work.

Hello all,
 
I'm having some serious trouble just getting Xerces to compile programs.  I'm using the newest version of Java, and also the newest version of Xerces.  I compile Xerces from source by first untarring the src tar file into a directory, then untarring the tools tar into the same directory.  I require dom3 support so I built xerces using ./build.sh jars-dom3.  I also require jdom support, so I went thru the appropriate steps to build jdom.  This has all gone without a hitch, its when I try to use them that the errors come about.
 
I created a bash script to compile my program, basically it sets up all of my environment variables and then compiles the source files, it looks similar to the following:
 
#!/bin/sh
JAVA_HOME=/survey/java/j2sdk1.4.1
JDOM_HOME=/survey/jdom/jdom-b9/build
XERCES_HOME=/survey/xerces/xerces-2_5_0/build
 
PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=$XERCES_HOME/dom3-xml-apis.jar:$XERCES_HOME/dom3-xercesImpl.jar:$XERCES_HOME/xercesSamples.jar:$XERCES_HOME/classes:
$JDOM_HOME/jdom.jar:$JDOM_HOME/classes
 
export JAVA_HOME JDOM_HOME XERCES_HOME PATH CLASSPATH
javac *.java
 
This bash script is inside of a directory that contains all of the .java files I am concerned with compiling.  I simply run the script, and I'm supposing that it should first export the appropriate environment variables, then compile the files, however, when I compile this, I get a ton of errors all xerces based.  Everything from it not being able to find certain methods of classes (including the normalizeDocument and getConfig methods of the Document class), to it not being able to even find certain classes I'm trying to import (DOMBuilder).
 
Is there something I'm missing here?
 
Thanks,
Nate


---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: Serious problems getting Xerces to work.

Posted by Nate McFeters <nm...@yahoo.com>.
Thanks Mike,
 
I guess that explains it all then.  One question just in general if you can answer, why is JDOM not shipped whereas DOM is shipped?  It would seem to me that since JDOM is written in Java that it would be either JDOM or both that shipped.  Perhaps it is just because the xerces parser is used for so many other things.
 
Thanks again!
 
Nate

Michael Glavassevich <mr...@apache.org> wrote:
Hi Nate,

I wouldn't expect you'd have any problems with JDOM as it isn't
(currently) shipped with the JDK.

On Sat, 8 Nov 2003, Nate McFeters wrote:

> Thank you so much Michael. I expected something like this, however, I thought that since JDOM was without problems, DOM should be working too. I will take a look at the link you provided and see if I can't figure this out.

---------------------------
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@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


---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: Serious problems getting Xerces to work.

Posted by Michael Glavassevich <mr...@apache.org>.
Hi Nate,

I wouldn't expect you'd have any problems with JDOM as it isn't
(currently) shipped with the JDK.

On Sat, 8 Nov 2003, Nate McFeters wrote:

> Thank you so much Michael.  I expected something like this, however, I thought that since JDOM was without problems, DOM should be working too.  I will take a look at the link you provided and see if I can't figure this out.

---------------------------
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@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


Re: Serious problems getting Xerces to work.

Posted by Nate McFeters <nm...@yahoo.com>.
Thank you so much Michael.  I expected something like this, however, I thought that since JDOM was without problems, DOM should be working too.  I will take a look at the link you provided and see if I can't figure this out.

Michael Glavassevich <mr...@apache.org> wrote:Hello Nate,

Seeing from your setup that you're using JDK 1.4.1, I suspect that you're
picking up the XML APIs (ones that don't include DOM Level 3) that
shipped with the JDK. Depending on the vendor, this JDK may also come
with the Crimson parser or some older version of Xerces. All of these
classes will be in the bootclasspath. This takes higher precedence than
the classpath you specify. Have a look at the Endorsed Standards
Override Mechanism [1] for how to override these classes included with
the Java platform with your own.

[1] http://java.sun.com/j2se/1.4.1/docs/guide/standards/

On Fri, 7 Nov 2003, Nate McFeters wrote:

> Hello all,
>
> I'm having some serious trouble just getting Xerces to compile programs. I'm using the newest version of Java, and also the newest version of Xerces. I compile Xerces from source by first untarring the src tar file into a directory, then untarring the tools tar into the same directory. I require dom3 support so I built xerces using ./build.sh jars-dom3. I also require jdom support, so I went thru the appropriate steps to build jdom. This has all gone without a hitch, its when I try to use them that the errors come about.
>
> I created a bash script to compile my program, basically it sets up all of my environment variables and then compiles the source files, it looks similar to the following:
>
> #!/bin/sh
> JAVA_HOME=/survey/java/j2sdk1.4.1
> JDOM_HOME=/survey/jdom/jdom-b9/build
> XERCES_HOME=/survey/xerces/xerces-2_5_0/build
>
> PATH=$PATH:$JAVA_HOME/bin
> CLASSPATH=$XERCES_HOME/dom3-xml-apis.jar:$XERCES_HOME/dom3-xercesImpl.jar:$XERCES_HOME/xercesSamples.jar:$XERCES_HOME/classes:
> $JDOM_HOME/jdom.jar:$JDOM_HOME/classes
>
> export JAVA_HOME JDOM_HOME XERCES_HOME PATH CLASSPATH
> javac *.java
>
> This bash script is inside of a directory that contains all of the .java files I am concerned with compiling. I simply run the script, and I'm supposing that it should first export the appropriate environment variables, then compile the files, however, when I compile this, I get a ton of errors all xerces based. Everything from it not being able to find certain methods of classes (including the normalizeDocument and getConfig methods of the Document class), to it not being able to even find certain classes I'm trying to import (DOMBuilder).
>
> Is there something I'm missing here?
>
> Thanks,
> Nate
>
>
> ---------------------------------
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard

---------------------------
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@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



---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: Serious problems getting Xerces to work.

Posted by Michael Glavassevich <mr...@apache.org>.
Hello Nate,

Seeing from your setup that you're using JDK 1.4.1, I suspect that you're
picking up the XML APIs (ones that don't include DOM Level 3) that
shipped with the JDK. Depending on the vendor, this JDK may also come
with the Crimson parser or some older version of Xerces. All of these
classes will be in the bootclasspath. This takes higher precedence than
the classpath you specify. Have a look at the Endorsed Standards
Override Mechanism [1] for how to override these classes included with
the Java platform with your own.

[1] http://java.sun.com/j2se/1.4.1/docs/guide/standards/

On Fri, 7 Nov 2003, Nate McFeters wrote:

> Hello all,
>
> I'm having some serious trouble just getting Xerces to compile programs.  I'm using the newest version of Java, and also the newest version of Xerces.  I compile Xerces from source by first untarring the src tar file into a directory, then untarring the tools tar into the same directory.  I require dom3 support so I built xerces using ./build.sh jars-dom3.  I also require jdom support, so I went thru the appropriate steps to build jdom.  This has all gone without a hitch, its when I try to use them that the errors come about.
>
> I created a bash script to compile my program, basically it sets up all of my environment variables and then compiles the source files, it looks similar to the following:
>
> #!/bin/sh
> JAVA_HOME=/survey/java/j2sdk1.4.1
> JDOM_HOME=/survey/jdom/jdom-b9/build
> XERCES_HOME=/survey/xerces/xerces-2_5_0/build
>
> PATH=$PATH:$JAVA_HOME/bin
> CLASSPATH=$XERCES_HOME/dom3-xml-apis.jar:$XERCES_HOME/dom3-xercesImpl.jar:$XERCES_HOME/xercesSamples.jar:$XERCES_HOME/classes:
> $JDOM_HOME/jdom.jar:$JDOM_HOME/classes
>
> export JAVA_HOME JDOM_HOME XERCES_HOME PATH CLASSPATH
> javac *.java
>
> This bash script is inside of a directory that contains all of the .java files I am concerned with compiling.  I simply run the script, and I'm supposing that it should first export the appropriate environment variables, then compile the files, however, when I compile this, I get a ton of errors all xerces based.  Everything from it not being able to find certain methods of classes (including the normalizeDocument and getConfig methods of the Document class), to it not being able to even find certain classes I'm trying to import (DOMBuilder).
>
> Is there something I'm missing here?
>
> Thanks,
> Nate
>
>
> ---------------------------------
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard

---------------------------
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@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