cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Lichtenberger <Johannes.Lichtenber...@uni-konstanz.de>
Subject Re: log4j issues...
Date Fri, 11 Dec 2009 00:45:59 GMT
On Fri, 2009-12-11 at 00:50 +0100, Steven Dolg wrote:
> Johannes Lichtenberger schrieb:
> > Hello,
> >
> > I'm still trying to catch errors with my logger, now I've even tried the
> > following:
> >
> >   static { 
> > GoogleEarthGenerator.class.getResource("rcl-config/WEB-INF/log4j.xml");
> >   }
> >   
> >   /** Logger (commons-logging). */
> >   private Log logger = LogFactory.getLog(getClass().getName());
> >
> > but I'm always receiving the following warning (which occurs because it
> > can't find log4j.xml..., somehow even not when copied to the mysite
> > project directory root).
> >   
> 
> Unless you are using some helper to configure log4j for you (eg like 
> org.apache.cocoon.spring.configurator.log4j.Log4JConfigurator) log4j 
> will look for a configuration in the classpath.
> So you might want that file in WEB-INF/classes.
> And there is no need to access it from your own code.

Hm, I have no directory named classes within WEB-INF, but see below.

> > Would be great if someone could help me, please. It seems some errors
> > are caught in cocoon.log and some aren't.
> >
> > My general logging concept of errors is like the following, so I'm
> > getting a short message _and_ the stacktrace.
> >
> >     } catch (SAXException e) {
> >       logger.warn("SAX exception: " + e.getMessage(), e);
> >     } catch (TreetankIOException e) {
> >       logger.warn("TreeTank IO exception: " + e.getMessage(), e);
> >     } catch (TreetankException e) {
> >       logger.warn("General Treetank exception: " + e.getMessage(), e);
> >     }
> >
> > All I can see on STDOUT is about 100 lines like:
> >
> > 	at
> > org.treetank.cocoon.generating.GoogleEarthGenerator.skip(GoogleEarthGenerator.java:178)
> > 	at
> > org.treetank.cocoon.generating.GoogleEarthGenerator.skip(GoogleEarthGenerator.java:178)
> > 	at
> > org.treetank.cocoon.generating.GoogleEarthGenerator.skip(GoogleEarthGenerator.java:178)
> >
> > but I have no clue on what's the kind of exception thrown and the
> > stacktrace and so on, all I know is the line (178, which is a recursive
> > call of the method "skip(...)").
> >   
> 
> Looks like your recursion is too deep and you're getting a 
> StackOverflowError.

Oh yes, exactly, after adding a static-Block with some initialisation
which should only be done once so I get the stack trace after a second
call to http://localhost:8888/gearth/?BBOX=1,1,1,1.

Do you know how to configure the JVM used (enable assertions -- -vmargs
-ea)?

Thank you.

regards,
Johannes


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message