Thanks. I suppose I'll use a batch file to temporarily set CLASSPATH. It's 
ugly, but workable.
--
Charles Knell
[EMAIL PROTECTED] - email



-----Original Message-----
From:     Antoine Levy-Lambert <[EMAIL PROTECTED]>
Sent:     Mon, 04 Apr 2005 19:24:45 +0200
To:       Ant Users List <user@ant.apache.org>
Subject:  Re: taskdef-classpath fails to add jars to classpath

Hello,
the fact that the class

org/apache/avalon/framework/logger/Logger is not found might indicate that this 
class
is loaded directly or undirectly by another class, which is using your startup 
classloader.
this is documented under http://ant.apache.org/faq.html#delegating-classloader
This kind of problem happens often with classes which are loaded by factories, 
such as JDBC or JNDI drivers.
There is nothing much you can do about this.
[except that sometimes I dream of classloaders being made aware of their 
children, maybe with a stack or probably
even a graph structure ]
Cheers,
Antoine


[EMAIL PROTECTED] wrote:

I have the following:
- ant 1.6.2 - FOP 0.20.5
- WinXP Pro 2002 Service Pack 2
- FOP_HOME is defined as "C:\Program Files\Apache Software Foundation\fop-0.20.5"
- CLASSPATH is defined as "C:/apache-ant-1.6.2\lib\ant.jar;C:/apache-ant-1.6.2\lib\optional.jar;C:/apache-a
nt-1.6.2\lib\xercesImpl.jar;C:/apache-ant-1.6.2\lib\xml-apis.jar;c:\saxon\saxon.
jar;c:\saxon\saxon-jdom.jar;C:\Xalan-J\bin\xalan.jar;C:\Program Files\Apache Sof
tware Foundation\fop-0.20.5/build/fop.jar;C:\junit3.8.1/junit.jar;C:\junit3.8.1"


In my build.xml file I have this taskdef:
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
   <classpath>
     <pathelement location="${env.FOP_HOME}/build/fop.jar"/>
     <pathelement 
location="${env.FOP_HOME}/lib/avalon-framework-cvs-20020806.jar"/>
     <pathelement location="${env.FOP_HOME}/lib/batik.jar"/>
   </classpath>
</taskdef>

Further along in build.xml is this target:
<target name="make-race-chart-pdf" description="converts the xsl-fo race chart to a 
.pdf document">
<fop format="application/pdf" fofile="${output-dir}/${next-week}/race-chart.fo.xml" 
outfile="${output-dir}/${next-week}/race-chart.pdf" />
</target>

When I execute ant I get this error message:
"BUILD FAILED
C:\Data\Pool-14.1\build.xml:10: taskdef A class needed by class org.apache.fop.t
ools.anttasks.Fop cannot be found: org/apache/avalon/framework/logger/Logger"

If I manually place the .jar files named in the <taskdef> in the CLASSPATH and 
execute ant the build succeeds. Can anyone diagnose my problem?

Thanks.






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to