Hi,

I want to use log4j to log the fop messages I get from the Driver.

I implemented it like this:

import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.logger.Log4JLogger;

...

    org.apache.log4j.Category cat = 
org.apache.log4j.Category.getInstance(my.class);

...

       Driver driver = new Driver();
       Logger log = new Log4JLogger(cat);
       driver.setLogger(log);
       driver.setRenderer(driver.RENDER_PDF);
       driver.setOutputStream(out);
       driver.render(doc);

and get the following error:

java.lang.NoClassDefFoundError: 
org/apache/avalon/framework/logger/ConsoleLogger
        at org.apache.fop.messaging.MessageHandler.log(Unknown Source)
        at org.apache.fop.messaging.MessageHandler.logln(Unknown Source)
        at org.apache.fop.render.pdf.FontSetup.setup(Unknown Source)
        at org.apache.fop.render.PrintRenderer.setupFontInfo(Unknown Source)
        at org.apache.fop.apps.StreamRenderer.startRenderer(Unknown Source)
        at org.apache.fop.fo.FOTreeBuilder.startDocument(Unknown Source)
        at org.apache.fop.tools.DocumentReader.parse(Unknown Source)
        at org.apache.fop.apps.Driver.render(Unknown Source)
        at org.apache.fop.apps.Driver.render(Unknown Source)
        at com.timesoft.report.my.renderFO(my.java:108)

when I'm using the avalon-framwork-4.1.2.jar. The problem with the 
avalon-framework-cvs-20020315.jar that comes with the 
fop-0.20.4-bin.tar.gz is, that it doesn't have the 
org.apache.avalon.framework.logger.Log4JLogger class.

(in my.java:108 I do driver.render(doc); )

Any suggestions?

Jens


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

Reply via email to