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 Geert Poels <ge...@Lant.be> on 2001/12/12 13:10:37 UTC

Xalan/Xerces version : different output JDK1.3.1 / 1.4b3

hi,

Because we've had some problems mixing up versions of Xalan/Xerces and
Windows settings classpath interference, I've created a couple of batchfiles
to compile and run our application using JDK1.3.1 and JDK1.4 beta3.
To my surprise, I have a different output from the Xalan test using 1.3 or
1.4
with the same set of libraries in the classpath.

I'm using :
java -classpath %CLASSPATH% org.apache.xalan.xslt.EnvironmentCheck
java -classpath %CLASSPATH% org.apache.xerces.framework.Version

xerces.jar is placed before xalan21.jar (no real reason, just happened that
way).

Summary of the tests :

Using 1.3.1 :
java.version=1.3.1-rc2
version.JAXP=1.1

version.xerces=Xerces 1.4.2
version.DOM.draftlevel=2.0fd
version.xalan2=Xalan;Java;2.1.0;
Xerces 1.4.2

Using 1.4b3 :
java.version=1.4.0-beta3
version.JAXP=1.1
version.xerces=not-present
version.DOM.draftlevel=2.0fd
version.xalan2=Xalan;Java;Xalan Java 2.2.D10;
Xerces 1.4.2

How can this be ??

Thanks,

Geert

Those interested in more details :
COMPILING with 1.3.1

--== XalanTEST ==--
#---- BEGIN writeEnvironmentReport($Revision: 1.3 $): Useful properties
found: -
---
java.version=1.3.1-rc2
#---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ----
xerces.jar.apparent.version=xerces.jar potential-ERROR
present-unknown-version
xerces.jar.path=C:\IntegratedDemo\.\lib\xerces.jar
jaxp.jar.apparent.version=jaxp.jar from jaxp-1.1
jaxp.jar.path=C:\IntegratedDemo\.\lib\jaxp.jar
#----- END Listing XML-related jars in: foundclasses.java.class.path -----
version.JAXP=1.1
java.ext.dirs=C:\jdk1.3.1\jre\lib\ext
version.crimson=not-present
java.class.path=C:\jdk1.3.1\jre\lib\rt.jar;.;./src;./lib/xerces.jar;./lib/lo
g4j.
jar;./lib/acrobat.zip;./lib/MRJToolkitStubs.zip;./lib/jaxp.jar;./lib/xalan21
.jar

version.xerces=Xerces 1.4.2
sun.boot.class.path=C:\jdk1.3.1\jre\lib\rt.jar;C:\jdk1.3.1\jre\lib\i18n.jar;
C:\j
dk1.3.1\jre\lib\sunrsasign.jar;C:\jdk1.3.1\jre\classes
version.DOM.draftlevel=2.0fd
version.xalan2=Xalan;Java;2.1.0;
version.DOM=2.0
version.xalan1=not-present
#----- END writeEnvironmentReport: Useful properties found: -----
# YAHOO! Your environment seems to be OK.
ECHO is off.
--== XercesTEST ==--
Xerces 1.4.2

COMPILING using 1.4b3 :

--== XalanTEST ==--
#---- BEGIN writeEnvironmentReport($Revision: 1.5 $): Useful properties
found: -
---
java.version=1.4.0-beta3
#---- BEGIN Listing XML-related jars in: foundclasses.java.class.path ----
xerces.jar.apparent.version=xerces.jar potential-ERROR
present-unknown-version
xerces.jar.path=C:\IntegratedDemo\.\lib\xerces.jar
jaxp.jar.apparent.version=jaxp.jar from jaxp-1.1
jaxp.jar.path=C:\IntegratedDemo\.\lib\jaxp.jar
#----- END Listing XML-related jars in: foundclasses.java.class.path -----
version.JAXP=1.1
java.ext.dirs=C:\j2sdk140b3\jre\lib\ext
version.crimson=not-present
java.class.path=C:\j2sdk140b3\jre\lib\rt.jar;.;./src;./lib/xerces.jar;./lib/
log4
j.jar;./lib/acrobat.zip;./lib/MRJToolkitStubs.zip;./lib/jaxp.jar;./lib/xalan
21.j
ar
version.xerces=not-present
sun.boot.class.path=C:\j2sdk140b3\jre\lib\rt.jar;C:\j2sdk140b3\jre\lib\i18n.
jar;
C:\j2sdk140b3\jre\lib\sunrsasign.jar;C:\j2sdk140b3\jre\lib\jsse.jar;C:\j2sdk
140b
3\jre\lib\jce.jar;C:\j2sdk140b3\jre\lib\charsets.jar;C:\j2sdk140b3\jre\class
es
version.DOM.draftlevel=2.0fd
version.xalan2=Xalan;Java;Xalan Java 2.2.D10;
version.DOM=2.0
version.xalan1=not-present
#----- END writeEnvironmentReport: Useful properties found: -----
# YAHOO! Your environment seems to be OK.
ECHO is off.
--== XercesTEST ==--
Xerces 1.4.2

The batchfiles used :

compile 1.3 :

@echo off
echo
echo Compiling LES JDK13  ( please adjust these settings to your
installation dir)
echo

set CLASSESDIR=classes
mkdir %CLASSESDIR%
del /q/s %CLASSESDIR%
cls
set JAVA_HOME=C:\jdk1.3.1
set PATH=%JAVA_HOME%\bin
set
CLASSPATH=%JAVA_HOME%\jre\lib\rt.jar;.;./src;./lib/xerces.jar;./lib/log4j.ja
r;./lib/acrobat.zip;./lib/MRJToolkitStubs.zip;./lib/jaxp.jar;./lib/xalan21.j
ar

REM     test Xalan and Xerces environment
echo
echo --== XalanTEST ==--
java -classpath %CLASSPATH% org.apache.xalan.xslt.EnvironmentCheck
echo
echo --== XercesTEST ==--
java -classpath %CLASSPATH% org.apache.xerces.framework.Version
echo

REM     Actual compilation
javac -classpath %CLASSPATH% -deprecation -d ./%CLASSESDIR%
./src/les/LES.java
pause


compile 1.4:

 @echo off
echo
echo Compiling LES JDK14  ( please adjust these settings to your
installation dir)
echo

set CLASSESDIR=classes14
mkdir %CLASSESDIR%
del /q/s %CLASSESDIR%
cls
set JAVA_HOME=C:\j2sdk140b3
set PATH=%JAVA_HOME%\bin
set
CLASSPATH=%JAVA_HOME%\jre\lib\rt.jar;.;./src;./lib/xerces.jar;./lib/log4j.ja
r;./lib/acrobat.zip;./lib/MRJToolkitStubs.zip;./lib/jaxp.jar;./lib/xalan21.j
ar

REM     test Xalan and Xerces environment
echo
echo --== XalanTEST ==--
java -classpath %CLASSPATH% org.apache.xalan.xslt.EnvironmentCheck
echo
echo --== XercesTEST ==--
java -classpath %CLASSPATH% org.apache.xerces.framework.Version
echo

REM     Actual compilation
javac -classpath %CLASSPATH% -deprecation -d ./%CLASSESDIR%
./src/les/LES.java
pause

best,

Geert Poels


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


Re: Xalan/Xerces version : different output JDK1.3.1 / 1.4b3

Posted by Geert Poels <ge...@Lant.be>.
As Tom stated it's indeed in de JDK itself ...


> Hi Geert,
> 
> "Geert Poels" <ge...@Lant.be> writes:
> > To my surprise, I have a different output from the Xalan test using
> > 1.3 or 1.4 with the same set of libraries in the classpath.
> 
> Is it possible that you see stuff coming from the extensions directory
> of the Java implementation?  We had that problem with our J2EE
> installation on Solaris.  You may want to remove jar files containing
> duplicate classes from the Java extensions directory.
> 
> so long, benny
> -- 
> Energis-ISION
> Benjamin Riefenstahl
> Harburger Schlossstrasse 1
> D-21079 Hamburg



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


Re: Xalan/Xerces version : different output JDK1.3.1 / 1.4b3

Posted by Geert Poels <ge...@Lant.be>.
What ?
On the Xalan site I read
     Xalan-Java version 2.2.D14 is intended to be the final release in the
current series of Developer releases incorporating the DTM



Why does Sun take a beta release and why include it by default ?


> One other thing to consider is that JDK1.4 has a version of Xalan in the
> rt.jar. I am not sure which version of the JDK1.4 you are using but FCS
> will contain Xalan D11. So the version on the class path may not be the
> version you are actually using as a result of it finding the classes in
> the JDK distribution first. You can get around this by placing xalan.jar
> in the endorsed lib directory of the JDK1.4. Alternatively, you can put
> xalan.jar in the bootclasspath of the JVM, that is if your JVM supports
> this option.



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


Re: Xalan/Xerces version : different output JDK1.3.1 / 1.4b3

Posted by Tom Kincaid <To...@Sun.COM>.
One other thing to consider is that JDK1.4 has a version of Xalan in the
rt.jar. I am not sure which version of the JDK1.4 you are using but FCS
will contain Xalan D11. So the version on the class path may not be the
version you are actually using as a result of it finding the classes in
the JDK distribution first. You can get around this by placing xalan.jar
in the endorsed lib directory of the JDK1.4. Alternatively, you can put
xalan.jar in the bootclasspath of the JVM, that is if your JVM supports
this option.

Tom

Benjamin Riefenstahl wrote:

> Hi Geert,
>
> "Geert Poels" <ge...@Lant.be> writes:
> > To my surprise, I have a different output from the Xalan test using
> > 1.3 or 1.4 with the same set of libraries in the classpath.
>
> Is it possible that you see stuff coming from the extensions directory
> of the Java implementation?  We had that problem with our J2EE
> installation on Solaris.  You may want to remove jar files containing
> duplicate classes from the Java extensions directory.
>
> so long, benny
> --
> Energis-ISION
> Benjamin Riefenstahl
> Harburger Schlossstrasse 1
> D-21079 Hamburg
>
> eMail: benjamin.riefenstahl@energis-ision.com
> Web: http://www.energis-ision.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


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


Re: Xalan/Xerces version : different output JDK1.3.1 / 1.4b3

Posted by Benjamin Riefenstahl <Be...@energis-ision.com>.
Hi Geert,

"Geert Poels" <ge...@Lant.be> writes:
> To my surprise, I have a different output from the Xalan test using
> 1.3 or 1.4 with the same set of libraries in the classpath.

Is it possible that you see stuff coming from the extensions directory
of the Java implementation?  We had that problem with our J2EE
installation on Solaris.  You may want to remove jar files containing
duplicate classes from the Java extensions directory.

so long, benny
-- 
Energis-ISION
Benjamin Riefenstahl
Harburger Schlossstrasse 1
D-21079 Hamburg

eMail: benjamin.riefenstahl@energis-ision.com
Web: http://www.energis-ision.com


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