https://issues.apache.org/bugzilla/show_bug.cgi?id=51403

             Bug #: 51403
           Summary: Avoid NullPointerException in JULI FileHandler if
                    formatter is misconfigured
           Product: Tomcat 7
           Version: 7.0.16
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: knst.koli...@gmail.com
    Classification: Unclassified


If formatter assigned to org.apache.juli.FileHandler in logging.properties is
misconfigured and fails to load,
the FileHandler starts without formatter and fails with an NPE later.

To reproduce: assign some bogus value to
1catalina.org.apache.juli.FileHandler.formatter

When Tomcat starts, the following will be printed at the console:

java.util.logging.ErrorManager: 4
java.lang.NullPointerException
        at org.apache.juli.FileHandler.openWriter(FileHandler.java:377)
        at org.apache.juli.FileHandler.<init>(FileHandler.java:99)
        at org.apache.juli.FileHandler.<init>(FileHandler.java:90)


I think we can be more tolerant to this configuration error and fall back to
the default formatter. I will commit a fix shortly.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to