Re: avalon-framework lib in distribution

2002-07-28 Thread Michael Gratton



Jens Kühnberger wrote:
> 
> thanks a lot, it worked. If u want to put the avalon-framework.jar I 
> generated into the distribution, I can send it to you.

Well, I'm not a committer, so we'll see if any of those who are want it.. :)

> When I create a pdf document I get output into my (log4j-)logfile, but I 
> also get the following warning on the console:
> 
> [WARNING] Screen logger not set.

Ahh, you want to call MessageHandler.setScreenLogger(Logger) somewhere 
in your code. There's some points in the maintenance branch's codebase 
which don't have access to the logger you give to Driver. In these cases 
the code logs via the static methods on MessageHandler.

Note that because MessageHandler is completely (IIRC) static, you only 
have to set it once. Also, the logger you give it could be used 
concurrently.

> Anyway, thanks a lot
> 

No problem,
Mike.

-- 
Michael Gratton <[EMAIL PROTECTED]>
Recall Design 
s: 53 Gilbert Street Adelaide SA 5000 Australia
t: +61 8 8217 0500 f: +61 8 8217 0555



smime.p7s
Description: S/MIME Cryptographic Signature


avalon-framework lib in distribution

2002-07-28 Thread Jens Kühnberger

Hi Mike,

thanks a lot, it worked. If u want to put the avalon-framework.jar I 
generated into the distribution, I can send it to you.

There is just one thing, that's a bit odd.
When I create a pdf document I get output into my (log4j-)logfile, but I 
also get the following warning on the console:

[WARNING] Screen logger not set.

Anyway, thanks a lot

Jens

  > Hi Jens,
  >
  > I built avalon-framework-cvs-20020315.jar from the Framework codebase
  > in CVS (pulled on the date of the jar file) because at the time, the
  > current release was too out of date. Unfortunately, I think there
  > still hasn't been another release yet.
  >
  > Jens Kühnberger wrote:
  >> java.lang.NoClassDefFoundError:
  >> org/apache/avalon/framework/logger/ConsoleLogger
  >> [snip]
  >> when I'm using the avalon-framwork-4.1.2.jar.
  >
  > You'll get the NoClassDefFoundError when using
  > avalon-framwork-4.1.2.jar
  > because it doesn't contain the afore-mentioned up-to-date code.
  >
  >> 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.
  >
  > The Log4JLogger probably wasn't built becuase Log4J would not have
  > been found when I was compiling the Framework codebase.
  >
  > The solution would be to pull the Framework source code, make sure
  > Log4J is on your CLASSPATH, and build it. Use the resulting jar
  > instead of both avalon-framework-cvs-20020315.jar and
  > avalon-framwork-4.1.2.jar and you should be fine.
  >
  >
  > HTH,
  > /mike
  >
  > --
  > Michael Gratton <[EMAIL PROTECTED]>
  > Recall Design 
  > s: 53 Gilbert Street Adelaide SA 5000 Australia
  > t: +61 8 8217 0500 f: +61 8 8217 0555



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




Re: avalon-framework lib in distribution

2002-07-27 Thread Michael Gratton


Hi Jens,

I built avalon-framework-cvs-20020315.jar from the Framework codebase in 
CVS (pulled on the date of the jar file) because at the time, the 
current release was too out of date. Unfortunately, I think there still 
hasn't been another release yet.

Jens Kühnberger wrote:
> java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/ConsoleLogger
> [snip]
> when I'm using the avalon-framwork-4.1.2.jar.

You'll get the NoClassDefFoundError when using avalon-framwork-4.1.2.jar 
because it doesn't contain the afore-mentioned up-to-date code.

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

The Log4JLogger probably wasn't built becuase Log4J would not have been 
found when I was compiling the Framework codebase.

The solution would be to pull the Framework source code, make sure Log4J 
is on your CLASSPATH, and build it. Use the resulting jar instead of 
both avalon-framework-cvs-20020315.jar and avalon-framwork-4.1.2.jar and 
you should be fine.

HTH,
/mike

-- 
Michael Gratton <[EMAIL PROTECTED]>
Recall Design 
s: 53 Gilbert Street Adelaide SA 5000 Australia
t: +61 8 8217 0500 f: +61 8 8217 0555



smime.p7s
Description: S/MIME Cryptographic Signature


avalon-framework lib in distribution

2002-07-27 Thread Jens Kühnberger

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]