cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Dolg <steven.d...@indoqa.com>
Subject Re: log4j issues...
Date Thu, 10 Dec 2009 23:50:50 GMT
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.

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

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


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


Mime
View raw message