ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SimonRichards...@halifax.co.uk
Subject RE: Problem: Ant 1.3 with JDK1.2.2.007
Date Thu, 03 May 2001 16:36:35 GMT
Jianhe

Be warned I'm not a java developer, just an Ant user.  A lot of what i say
here is pure speculation :-).  But I managed to solve a problem very similar
to yours (I had the same error message).

There's nothing wrong with tools.jar, but it contains the following classes
(which suggests there's a parser implementation in tool.jar):

 28346 Wed Jun 21 13:57:10 GMT 2000 sun/tools/java/Parser.class
   714 Wed Jun 21 13:57:18 GMT 2000 sun/tools/java/ParserActions.class
  5437 Wed Jun 21 13:56:42 GMT 2000 sun/tools/javac/BatchParser.class
  3087 Wed Jun 21 16:26:58 GMT 2000
com/sun/tools/javadoc/SeeTagImpl$ParameterParseMachine.class

And I would think the tools.jar appears before the ant jars in the
LOCALCLASSPATH before ant is run.  See if you can edit the ant shell script
to echo the value of LOCALCLASSPATH before it runs the command to execute
ant.

If it's true (i.e. tools.jar appears before ant jars) then try removing
tools.jar and place it in the classpath attribute of your javac task
(assuming you are using javac task) in your build.xml file.  It doesn't
matter if you hard code at this stage, just try to get something working!

Let me know how you get on.


Simon

> -----Original Message-----
> From: lily Gao [mailto:xmlt@hotmail.com]
> Sent: 03 May 2001 15:33
> To: ant-user@jakarta.apache.org
> Subject: RE: Problem: Ant 1.3 with JDK1.2.2.007
> 
> 
> Simon:
> 
> Thanks for your response!
> Even if I only include tools.jar in my classpath and use the 
> parser.jar and 
> jaxp.jar which come from the Ant package, I still get the 
> same problem. Is 
> there antyhting wrong with tools.jar from Sun-JDK1.2.2.007?
> Thanks!
> 
> -Jianhe
> 
> >From: SimonRichardson2@halifax.co.uk
> >Reply-To: ant-user@jakarta.apache.org
> >To: ant-user@jakarta.apache.org
> >Subject: RE: Problem: Ant 1.3 with JDK1.2.2.007
> >Date: Thu, 3 May 2001 14:52:37 +0100
> >
> >I've experienced the same problem running on Solaris and I 
> would guess it's
> >because you have a parser that is not compatible with ant in 
> your classpath
> >(xerces?)
> >
> >I got round the problem by making sure the standard CLASSPATH did not
> >include anything, and instead included my jars as a an 
> attribute in javac.
> >
> >	<!-- set global properties for this build -->
> >	<property environment="ss"/>
> >	<property name="myclasspath"  value="${ss.myclasspath}"/>
> >
> >	<target name="build" depends="init">
> >		<echo message="trdbd04 information: building ${src} into
> >${build}."/>
> >		<javac srcdir="${src}"
> >			destdir="${build}"
> >			classpath="${myclasspath}"
> >			excludesfile="${ssabhome}\trdbd04.excludes.txt"
> >			failonerror="no"/>
> >	</target>
> >
> >I put a wrapper around the call to ant which sets 
> "myclasspath" to include
> >all my *.jars, and also sets CLASSPATH=<nothing> (e.g export 
> CLASSPATH= ).
> >When the ant script (ANT) runs it attaches the jar files found in
> >ANT_HOME/lib to a LOCALCLASSPATH before calling ant.
> >
> >Hope this helps.
> >
> >Simon
> >
> > > -----Original Message-----
> > > From: lily Gao [mailto:xmlt@hotmail.com]
> > > Sent: 03 May 2001 14:19
> > > To: ant-user@jakarta.apache.org
> > > Subject: Problem: Ant 1.3 with JDK1.2.2.007
> > >
> > >
> > > Greeting all:
> > >
> > > I got the following Java exception with running Ant1.3 with
> > > JDK1.2.2.007.
> > > When I run Tomcat 3.2.1, I got exactly the same problem. 
> I have only
> > > tools.jar with whatever jar files in ant\lib\ and tomcat\lib in my
> > > classpath. Any idea?
> > >
> > > ---------
> > > Buildfile: example1.xml
> > >
> > > BUILD FAILED
> > >
> > > javax.xml.parsers.FactoryConfigurationError:
> > > com.sun.xml.parser.SAXParserFactoryImpl
> > >         at
> > > javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactor
> > > y.java:84)
> > >         at
> > > org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java,
> > > Compiled Code)
> > >         at
> > > org.apache.tools.ant.ProjectHelper.configureProject(ProjectHel
> > > per.java:85)
> > >         at org.apache.tools.ant.Main.runBuild(Main.java,
> > > Compiled Code)
> > >         at org.apache.tools.ant.Main.main(Main.java:149)
> > >
> > > Total time: 0 seconds
> > > com.sun.xml.parser.SAXParserFactoryImpl
> > > ----------
> > >
> > > Thanks a lot!
> > >
> > > -Jianhe
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at http://explorer.msn.com
> > >
> > >
> >
> >-------------------------------------------------------------
> -----------------
> >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.
> >
> >
> >=============================================================
> =================
> >
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> 

------------------------------------------------------------------------------
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.


==============================================================================


Mime
View raw message