dev@glassfish.java.net

Re: feedback on GlassFish error reporting...

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Mon, 28 Nov 2005 13:52:23 -0800

Thanks Lloyd, This would be a good start.

However I think this is not enough. I have to agree with the Cay
Horstman that seeing a stack trace is not very friendly and has very
little added value to the developer (unless generated by the developer
code which we can detect in all cases).

I remember Ludo already complaining (...:)...) about that in 8.1 and Ken
Saks pointed out that it was an important debugging tool for us when
developer forward issues or application server potential bugs. I agree
this is a valid concern.

So I am wondering if we should not change our logging strategy to log
exceptions in a separate file (exceptions.log). In the server.log, we
should only see the exception.getMessage() with a ID that could be used
to cross reference in the exceptions.log. That way, usual developers
would not have to dig through exceptions logs in the server.log to get
an idea of what went wrong. When necessary, we can use the
exceptions.log when debugging problems.

KenS, Jan, Ludo (impact on Netbeans ?), others... feedback ?

Jerome

Lloyd L Chambers wrote:
> Jerome,
>
> I think Shreedhar is referring to the routine that gets the root cause
> of the Exception, getRootCause(). I originally created it because
> every exception propogated out of the MBeanServer gets wrapped inside
> a JMException of some kind, so the original exception is always buried
> it.
>
>
> /**
> Get the original troublemaker.
>
> @param e the Exception to dig into
> @return the original Throwable that started the problem
> */
> public static Throwable getRootCause( final Throwable e );
>
>
> /**
> Get the chain of exceptions via getCause(). The first element is the
> Exception passed.
>
> @param start the Exception to traverse
> @return a Throwable[] or an Exception[] as appropriate
> */
> public static Throwable[]getCauses( final Throwable start );
>
>
>
> Jerome Dochez wrote:
>
>> Lloyd or Shreedhar,
>>
>> can you elaborate what it does and how it would help ?
>>
>> thanks, Jerome
>>
>> Shreedhar Ganapathy wrote:
>>
>>> Lloyd's ExceptionUtil.java in admin/mbeanapi module is interesting
>>> in this regard. (located at com/sun/appserv/management/util/misc
>>> package). Perhaps this could be used in some form for addressing
>>> this and other related issues.
>>>
>>> Jim Driscoll wrote:
>>>
>>>> Cay Horstman isn't exactly a novice, either.
>>>>
>>>> Ludovic Champenois wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am not the only one complaining about our error reporting issues
>>>>> (many many of them):
>>>>> Please read:
>>>>> http://forums.java.net/jive/thread.jspa?threadID=2111&tstart=0
>>>>>
>>>>> What do we plan to do in this area for AS 9?
>>>>>
>>>>> Thanks,
>>>>> Ludo
>>>>>
>>