cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject SAXException weirdness (was Re: [2.1.8-dev] Real exception is not logged anymore)
Date Fri, 23 Sep 2005 14:08:17 GMT
Sylvain Wallez wrote:

> Carsten Ziegeler wrote:
>> Bart Molenkamp wrote:
>>> Ok, I just did an SVN update, and the behaviour changed... First, there
>>> was a change in the web interface. Previously, I just saw the cocoon
>>> stacktrace, reporting that the sitemap could not be built because of 
>>> the
>>> 'xslt2' that is unknown. Now, the portal page gets rendered, and I just
>>> see "The coplet Gallery-Petstore is currently not available.". Has this
>>> something to do with it?
>>> Also, the exception is not logged in cocoon.log anymore, but something
>>> is logged in portal.log. Not the original exception, but just a
>>> processing exception:
>> Ok, now you have the same behaviour as Jorg and I :)
>> Sylvain, did you test again?
> Yup, got it now. For some unknown reason, I had not the latest updates 
> in the portal block and now I can reproduce the error, both on MacOS 
> and Windows.
> Currently debugging...

Ok, I hopefully fixed it.

The problems was because of SAXException's buggy exception chaining (or 
at least not JDK 1.4 compatible) :
- it can wrap a parent exception but doesn't define a getCause() method 
that's used by JDK 1.4 to find parent exceptions
- it doesn't call its parent's printStacktrace() although it calls its 
parent's getMessage().

What happened is that when a SAXException was logged, the parent's 
stacktrace wasn't logged, and with the new location handling stuff, the 
useful information is there.

I fixed this by ensuring in CocoonLogFormatter that the full exception 
list is properly chained and this solves the problem.

Now I don't understand how we were able to print parent stack traces 


Sylvain Wallez                        Anyware Technologies
Apache Software Foundation Member     Research & Technology Director

View raw message