Peter
I've tried to run ant including xerces in the classpath but it falls over.
Removing xerces enables ant to run, but now javac is being executed with the
wrong jars in the classpath.
Debug Ant LOCALCLASSPATH:=
/hfx/var/49_superstructure/classes:/hfx/pvcs/49_superstructure_reference/ss1
:/hfx/home/develop/ssbuild/su
perstructure/lib/xml4j.jar:/hfx/home/develop/ssbuild/superstructure/lib/xerc
es.jar:/hfx/home/develop/ssbuild/superstructure:/opt/mqm
/java/lib:/opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/com.ibm.mqbind.
jar:/opt/mqm/java/lib/com.ibm.mqjms.jar:/opt/mqm/java/li
b/com.ibm.mq.iiop.jar:/opt/mqm/java/lib/jms.jar:/opt/mqm/java/lib/jndi.jar:/
opt/mqm/java/lib/ldap.jar:/opt/mqm/java/lib/fscontext.ja
r:/opt/mqm/java/lib/providerutil.jar:/opt/mqm/java/samples/En_US:/opt/mqm/to
ols/java/samples/En_US:/opt/SUNWjblnd/classes/JavaBlend.
jar::/hfx/home/develop/srtre/ss/jakarta-ant-1.3/lib/ant.jar:/hfx/home/develo
p/srtre/ss/jakarta-ant-1.3/lib/jaxp.jar:/hfx/home/develo
p/srtre/ss/jakarta-ant-1.3/lib/parser.jar:/usr/java1.3_0_02/lib/tools.jar
Debug Ant CLASSPATH:=
/hfx/var/49_superstructure/classes:/hfx/pvcs/49_superstructure_reference/ss1
:/hfx/home/develop/ssbuild/superst
ructure/lib/xml4j.jar:/hfx/home/develop/ssbuild/superstructure/lib/xerces.ja
r:/hfx/home/develop/ssbuild/superstructure:/opt/mqm/java
/lib:/opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/com.ibm.mqbind.jar:/
opt/mqm/java/lib/com.ibm.mqjms.jar:/opt/mqm/java/lib/com
.ibm.mq.iiop.jar:/opt/mqm/java/lib/jms.jar:/opt/mqm/java/lib/jndi.jar:/opt/m
qm/java/lib/ldap.jar:/opt/mqm/java/lib/fscontext.jar:/op
t/mqm/java/lib/providerutil.jar:/opt/mqm/java/samples/En_US:/opt/mqm/tools/j
ava/samples/En_US:/opt/SUNWjblnd/classes/JavaBlend.jar
Buildfile: /hfx/home/develop/srtre/ss/ssab/xml/trdbd04.xml
BUILD FAILED
javax.xml.parsers.FactoryConfigurationError: Cannot load class
SAXParserFactory class "org.apache.xerces.jaxp.SAXParserFactoryImpl"
at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:153)
at
org.apache.tools.ant.ProjectHelper.getParserFactory(ProjectHelper.java:706)
at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:105)
at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
at org.apache.tools.ant.Main.runBuild(Main.java:403)
at org.apache.tools.ant.Main.main(Main.java:149)
Simon
-----Original Message-----
From: Peter Donald [mailto:[EMAIL PROTECTED]]
Sent: 30 April 2001 08:51
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: localclasspath
At 08:33 30/4/01 +0100, [EMAIL PROTECTED] wrote:
>I'm sorry to keep pushing this, but I haven't had a response.
;)
>> Has anyone else noticed the way that the LOCALCLASSPATH is constructed
>> differs between NT and Unix?
>>
>> Can I request that the ant libraries are added in the same way on both NT
>> and Unix?
You can request it - better if you sent a patch though ;)
>> If we change the way the ant libraries are added to LOCALCLASSPATH then
>> Ant will run, but will it compile (javac task) using LOCALCLASSPATH or
>> CLASSPATH? If it compiles using LOCALCLASSPATH then we have a problem
(at
>> least I think we do!).
Long story short - NEVER under ANY circumstances have two versions of same
libraries in classpath. Doing so can lead to odd issues everywhere ;) I
highly recomend you throw away jaxp/parser.jar and place xerces.jar in
[ant-home]/lib/
The above would fix your problem ;) However you *can* compile having both
jars in classpath by explicitly setting classpaths and setting overide
value and maybe some magic properties (build.*). See docs for details.
Cheers,
Pete
*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof." |
| - John Kenneth Galbraith |
*-----------------------------------------------------*
------------------------------------------------------------------------------
Part of the Halifax Group, Halifax plc, Registered in England No. 2367076. Registered
Office: Trinity Road, Halifax, West Yorkshire HX1 2RG. Represents only the Halifax
Financial Services Marketing Group for the purposes of advising on and selling life
assurance, pensions and unit trust business. The Marketing Group is regulated by the
Personal Investment Authority. Switchboard 01422 333333.
==============================================================================