You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Rick Hillegas <Ri...@Sun.COM> on 2007/04/05 16:09:21 UTC
running the XML tests
I'd like to setup my environment so that our XML tests run. I'm having a
hard time finding instructions for how to do this. Can someone point me
at the instructions for how to do this (which versions of which jar
files should be put where, any additional bootclasspath/classpath
directives, system properties that need to be set, etc.)?
Thanks,
-Rick
Re: running the XML tests
Posted by V Narayanan <V....@Sun.COM>.
Hi,
This issue seems to contain some information related to your question
https://issues.apache.org/jira/browse/DERBY-563
Narayanan
Rick Hillegas wrote On 04/05/07 19:39,:
> I'd like to setup my environment so that our XML tests run. I'm having
> a hard time finding instructions for how to do this. Can someone point
> me at the instructions for how to do this (which versions of which jar
> files should be put where, any additional bootclasspath/classpath
> directives, system properties that need to be set, etc.)?
>
> Thanks,
> -Rick
Re: running the XML tests
Posted by V Narayanan <V....@Sun.COM>.
I did not read it properly I read the information in the link as
<java-home>\lib\endorsed directory not jre/ext/lib. Sorry about the mistake.
Narayanan
V Narayanan wrote On 04/05/07 20:52,:
> Hi,
>
> I am lost here because placing the jar files in the jre/lib/ext is the
> standard override mechanism.
> The information here http://xml.apache.org/xalan-j/faq.html#faq-N100D6
> seems to concur with that.
>
> Narayanan
>
> Rick Hillegas wrote On 04/05/07 20:37,:
>
>> Thanks Bryan and Narayanan,
>>
>> I have downloaded xalan 2.7.0 (that seems to be the latest release
>> available from the xalan site). I copied the four jar files mentioned
>> by Bryan into the jre/lib/ext directory of my JDK 1.4. This did
>> slightly change the output of the environmental report created by
>> org.apache.xalan.xslt.EnvironmentCheck. Unfortunately, that report
>> still says that my xalan version is 2.4.1. Here's the output of "java
>> org.apache.xalan.xslt.EnvironmentCheck". Still puzzled. Thanks.
>>
>>
>> rick mainline (1.4) > java org.apache.xalan.xslt.EnvironmentCheck
>> #---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff
>> found: ----
>> version.DOM.draftlevel=2.0fd
>> java.class.path=.
>> version.JAXP=1.1
>> java.ext.dirs=/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/ext
>> version.xerces2=Xerces-J 2.7.1
>> version.xerces1=not-present
>> version.xalan2_2=Xalan Java 2.4.1
>> version.xalan1=not-present
>> version.ant=not-present
>> java.version=1.4.2_12
>> version.DOM=2.0
>> version.crimson=present-unknown-version
>> sun.boot.class.path=/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/rt.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/i18n.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/sunrsasign.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/jsse.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/jce.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/charsets.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/classes
>>
>> version.SAX=2.0
>> version.xalan2x=Xalan Java 2.4.1
>> #----- END writeEnvironmentReport: Useful properties found: -----
>> # YAHOO! Your environment seems to be OK.
>>
>>
>>
>> Bryan Pendleton wrote:
>>
>>>> I'd like to setup my environment so that our XML tests run.
>>>
>>>
>>>
>>> I think if you're using a modern enough JDK, no special setup is
>>> needed. If you're using JDK 1.4, in my environment it was sufficient
>>> to grab a modern copy of the xalan jars (I used 2.7 I believe) and copy
>>> them to my jre/lib/ext directory. I copied: serializer.jar, xalan.jar,
>>> xercesImpl.jar, and xml-apis.jar.
>>>
>>> Then the XML tests ran without any further issue.
>>>
>>> thanks,
>>>
>>> bryan
>>>
>>>
>>
Re: running the XML tests
Posted by V Narayanan <V....@Sun.COM>.
Hi,
I am lost here because placing the jar files in the jre/lib/ext is the
standard override mechanism.
The information here http://xml.apache.org/xalan-j/faq.html#faq-N100D6
seems to concur with that.
Narayanan
Rick Hillegas wrote On 04/05/07 20:37,:
> Thanks Bryan and Narayanan,
>
> I have downloaded xalan 2.7.0 (that seems to be the latest release
> available from the xalan site). I copied the four jar files mentioned
> by Bryan into the jre/lib/ext directory of my JDK 1.4. This did
> slightly change the output of the environmental report created by
> org.apache.xalan.xslt.EnvironmentCheck. Unfortunately, that report
> still says that my xalan version is 2.4.1. Here's the output of "java
> org.apache.xalan.xslt.EnvironmentCheck". Still puzzled. Thanks.
>
>
> rick mainline (1.4) > java org.apache.xalan.xslt.EnvironmentCheck
> #---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff
> found: ----
> version.DOM.draftlevel=2.0fd
> java.class.path=.
> version.JAXP=1.1
> java.ext.dirs=/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/ext
> version.xerces2=Xerces-J 2.7.1
> version.xerces1=not-present
> version.xalan2_2=Xalan Java 2.4.1
> version.xalan1=not-present
> version.ant=not-present
> java.version=1.4.2_12
> version.DOM=2.0
> version.crimson=present-unknown-version
> sun.boot.class.path=/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/rt.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/i18n.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/sunrsasign.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/jsse.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/jce.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/charsets.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/classes
>
> version.SAX=2.0
> version.xalan2x=Xalan Java 2.4.1
> #----- END writeEnvironmentReport: Useful properties found: -----
> # YAHOO! Your environment seems to be OK.
>
>
>
> Bryan Pendleton wrote:
>
>>> I'd like to setup my environment so that our XML tests run.
>>
>>
>> I think if you're using a modern enough JDK, no special setup is
>> needed. If you're using JDK 1.4, in my environment it was sufficient
>> to grab a modern copy of the xalan jars (I used 2.7 I believe) and copy
>> them to my jre/lib/ext directory. I copied: serializer.jar, xalan.jar,
>> xercesImpl.jar, and xml-apis.jar.
>>
>> Then the XML tests ran without any further issue.
>>
>> thanks,
>>
>> bryan
>>
>>
>
Re: running the XML tests
Posted by Bryan Pendleton <bp...@amberpoint.com>.
> available from the xalan site). I copied the four jar files mentioned by
> Bryan into the jre/lib/ext directory of my JDK 1.4.
Ooops, I'm sorry.
Copy the files to the jre/lib/endorsed directory, not the jre/lib/ext directory.
thanks,
bryan
Re: running the XML tests
Posted by Army <qo...@gmail.com>.
Rick Hillegas wrote:
>
> I like the idea of recording this advice in the javadoc too. Another
> possibility would be to beef up the javadoc header for the XML class.
+1, works for me.
Army
Re: running the XML tests
Posted by Rick Hillegas <Ri...@Sun.COM>.
Army wrote:
> Army wrote:
>>
>> I think the wiki would be helpful, yes. It also might be helpful to
>> include these as javadoc comments somehow, perhaps for the
>> "checkXalanVersion()" method of junit/XML.java? Or maybe someplace
>> else that you looked when you yourself were trying to figure out why
>> the tests weren't running?
>
> Or perhaps the "classpathMeetsXMLReqs()" method would be better since
> that is the method that is actually called from the "suite()" methods
> of the various XML tests...?
>
> Army
>
I like the idea of recording this advice in the javadoc too. Another
possibility would be to beef up the javadoc header for the XML class.
Thanks,
-Rick
Re: running the XML tests
Posted by Army <qo...@gmail.com>.
Army wrote:
>
> I think the wiki would be helpful, yes. It also might be helpful to
> include these as javadoc comments somehow, perhaps for the
> "checkXalanVersion()" method of junit/XML.java? Or maybe someplace else
> that you looked when you yourself were trying to figure out why the
> tests weren't running?
Or perhaps the "classpathMeetsXMLReqs()" method would be better since that is
the method that is actually called from the "suite()" methods of the various XML
tests...?
Army
Re: running the XML tests
Posted by Army <qo...@gmail.com>.
Rick Hillegas wrote:
> Thanks Army, Bryan, and Narayanan. I can now run the XML tests.
Good to hear!
> I think this deserves being documented somewhere. Maybe under "Running
> Tests" on the "DerbyJUnitTesting" wiki page? Is there a better place
> for this advice?
I think the wiki would be helpful, yes. It also might be helpful to include
these as javadoc comments somehow, perhaps for the "checkXalanVersion()" method
of junit/XML.java? Or maybe someplace else that you looked when you yourself
were trying to figure out why the tests weren't running?
Army
Re: running the XML tests
Posted by Rick Hillegas <Ri...@Sun.COM>.
Thanks Army, Bryan, and Narayanan. I can now run the XML tests. The
following worked for me:
1) Copying the xalan 2.7.0 jars into jre/lib/endorsed in my JDK 1.4
installation.
2) Simply wiring those jars into my CLASSPATH when running Java 6.
I think this deserves being documented somewhere. Maybe under "Running
Tests" on the "DerbyJUnitTesting" wiki page
(http://wiki.apache.org/db-derby/DerbyJUnitTesting)? Is there a better
place for this advice?
Thanks,
-Rick
Army wrote:
> Rick Hillegas wrote:
>>
>> I have downloaded xalan 2.7.0 (that seems to be the latest release
>> available from the xalan site). I copied the four jar files mentioned
>> by Bryan into the jre/lib/ext directory of my JDK 1.4. This did
>> slightly change the output of the environmental report created by
>> org.apache.xalan.xslt.EnvironmentCheck. Unfortunately, that report
>> still says that my xalan version is 2.4.1. Here's the output of "java
>> org.apache.xalan.xslt.EnvironmentCheck". Still puzzled. Thanks.
>
> If you're using Sun JDK 1.4 then there is an embedded version of Xalan
> that is version 2.4.1. That's what you're seeing in your
> "EnvironmentCheck". In order to use the Xalan 2.7 jar files you have
> to override the JDK embedded Xalan by using "Java Endorsed Standards":
>
> http://java.sun.com/j2se/1.4.2/docs/guide/standards/
>
> Or to be more specific, create an "endorsed" directory under
> <java-home>/jre/lib/ and then put the Xalan 2.7 jars into that
> directory. In particular the jars you need are:
>
> xalan.jar
> xercesImpl.jar
> xml-apis.jar
>
> Hopefully that'll solve the problem...
>
> Note: If you're using Sun JDK 1.5 or later I think you just have to
> include the Xalan 2.7 jars in your classpath and that should be it.
>
> Army
>
Re: running the XML tests
Posted by V Narayanan <V....@Sun.COM>.
Army wrote On 04/05/07 20:56,:
> Rick Hillegas wrote:
>
>>
>> I have downloaded xalan 2.7.0 (that seems to be the latest release
>> available from the xalan site). I copied the four jar files mentioned
>> by Bryan into the jre/lib/ext directory of my JDK 1.4. This did
>> slightly change the output of the environmental report created by
>> org.apache.xalan.xslt.EnvironmentCheck. Unfortunately, that report
>> still says that my xalan version is 2.4.1. Here's the output of "java
>> org.apache.xalan.xslt.EnvironmentCheck". Still puzzled. Thanks.
>
>
> If you're using Sun JDK 1.4 then there is an embedded version of Xalan
> that is version 2.4.1.
You are correct. I did a "jar -tvf jre/lib/rt.jar | grep xalan" on jdk
1.4 rt.jar and I did indeed find related files. I did not check their
version though.
Narayanan
Re: running the XML tests
Posted by Army <qo...@gmail.com>.
Rick Hillegas wrote:
>
> I have downloaded xalan 2.7.0 (that seems to be the latest release
> available from the xalan site). I copied the four jar files mentioned by
> Bryan into the jre/lib/ext directory of my JDK 1.4. This did slightly
> change the output of the environmental report created by
> org.apache.xalan.xslt.EnvironmentCheck. Unfortunately, that report still
> says that my xalan version is 2.4.1. Here's the output of "java
> org.apache.xalan.xslt.EnvironmentCheck". Still puzzled. Thanks.
If you're using Sun JDK 1.4 then there is an embedded version of Xalan that is
version 2.4.1. That's what you're seeing in your "EnvironmentCheck". In order
to use the Xalan 2.7 jar files you have to override the JDK embedded Xalan by
using "Java Endorsed Standards":
http://java.sun.com/j2se/1.4.2/docs/guide/standards/
Or to be more specific, create an "endorsed" directory under
<java-home>/jre/lib/ and then put the Xalan 2.7 jars into that directory. In
particular the jars you need are:
xalan.jar
xercesImpl.jar
xml-apis.jar
Hopefully that'll solve the problem...
Note: If you're using Sun JDK 1.5 or later I think you just have to include the
Xalan 2.7 jars in your classpath and that should be it.
Army
Re: running the XML tests
Posted by Rick Hillegas <Ri...@Sun.COM>.
Thanks Bryan and Narayanan,
I have downloaded xalan 2.7.0 (that seems to be the latest release
available from the xalan site). I copied the four jar files mentioned by
Bryan into the jre/lib/ext directory of my JDK 1.4. This did slightly
change the output of the environmental report created by
org.apache.xalan.xslt.EnvironmentCheck. Unfortunately, that report still
says that my xalan version is 2.4.1. Here's the output of "java
org.apache.xalan.xslt.EnvironmentCheck". Still puzzled. Thanks.
rick mainline (1.4) > java org.apache.xalan.xslt.EnvironmentCheck
#---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff
found: ----
version.DOM.draftlevel=2.0fd
java.class.path=.
version.JAXP=1.1
java.ext.dirs=/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/ext
version.xerces2=Xerces-J 2.7.1
version.xerces1=not-present
version.xalan2_2=Xalan Java 2.4.1
version.xalan1=not-present
version.ant=not-present
java.version=1.4.2_12
version.DOM=2.0
version.crimson=present-unknown-version
sun.boot.class.path=/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/rt.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/i18n.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/sunrsasign.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/jsse.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/jce.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/lib/charsets.jar:/export/home/rh161140/sw/java/j2sdk1.4.2_12/jre/classes
version.SAX=2.0
version.xalan2x=Xalan Java 2.4.1
#----- END writeEnvironmentReport: Useful properties found: -----
# YAHOO! Your environment seems to be OK.
Bryan Pendleton wrote:
>> I'd like to setup my environment so that our XML tests run.
>
> I think if you're using a modern enough JDK, no special setup is
> needed. If you're using JDK 1.4, in my environment it was sufficient
> to grab a modern copy of the xalan jars (I used 2.7 I believe) and copy
> them to my jre/lib/ext directory. I copied: serializer.jar, xalan.jar,
> xercesImpl.jar, and xml-apis.jar.
>
> Then the XML tests ran without any further issue.
>
> thanks,
>
> bryan
>
>
Re: running the XML tests
Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I'd like to setup my environment so that our XML tests run.
I think if you're using a modern enough JDK, no special setup is
needed. If you're using JDK 1.4, in my environment it was sufficient
to grab a modern copy of the xalan jars (I used 2.7 I believe) and copy
them to my jre/lib/ext directory. I copied: serializer.jar, xalan.jar,
xercesImpl.jar, and xml-apis.jar.
Then the XML tests ran without any further issue.
thanks,
bryan