Mantis - Resin
Viewing Issue Advanced Details
1361 minor always 09-20-06 05:04 01-04-07 14:57
rydenius  
ferg  
normal  
closed 3.0.21  
fixed  
none    
none 3.1.1  
0001361: com.caucho.log.MessageFormatter hides important stack information
com.caucho.log.MessageFormatter unwraps exceptions to the innermost cause and display only that in the log. That hides possibly important stack information from wrapping exceptions. I guess this is only a workaround for exceptions that overrides java.lang.Throwable's definition of printStackTrace(PrintStream), because that implementation automaticly prints all causes of the throwable too. Current implementation of MessageFormatter is useless for advanced debugging.
According to the release notes, this bug was introduced in Resin 3.0.7, "MessageFormatter needs to unwrap exception (rep by Thomas Zehetbauer)". Source code is:

    Throwable rootExn = thrown;

    for (;
         rootExn != null && rootExn.getCause() != null;
         rootExn = rootExn.getCause()) {
    }
    
        rootExn.printStackTrace(os.getPrintWriter());

Notes
(0001704)
ferg   
01-04-07 14:57   
server/023g