DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44038>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44038

           Summary: log4j is susceptible to exceptions thrown by Exception
                    classes
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P2
         Component: Appender
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


There is a bug in the Spring 2.5 MailSendException class where it throws an 
exception on calls to 
getMessage and printStackTrace (see SPR-4138 in Spring's bug DB). This spring 
bug exposed what I 
consider a problem with log4j.

Partial stack trace:

Caused by: java.lang.NullPointerException
        at 
org.springframework.mail.MailSendException.printStackTrace(MailSendException.java:149)
        at 
org.apache.log4j.spi.ThrowableInformation.getThrowableStrRep(ThrowableInformation.java:59)

I would expect log4j to use try/catch blocks around any calls it makes to 
Exception classes so that a 
consumer of the logging library can be confident that a call to a log(...) 
method will never throw an 
exception, even if a buggy exception reference is passed in. I'd rather get no 
message or stack trace in 
the output than have log4j pass the exception to my application. If this isn't 
addressed in log4j then I'll 
have to create a wrapper that around it that does trap any exceptions.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to