Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3131

Attempting to call getExtendedStackTraceAsString() after deserializing JSON LogEvent results in a NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.14.1
    • 3.0.0, 2.15.0
    • Layouts
    • None

    Description

      How to reproduce:

      1. Generate a LogEvent with an Exception that has at least one cause (i.e. nested Exception)
      2. Use the standard JSON Layout to turn that LogEvent into JSON
      3. Using JsonLogEventParser to turn it back into a LogEvent
      4. Call getExtendedStackTraceAsString() on the ThrowableProxy associated with the deserialized LogEvent
      5. A NullPointerException will be thrown

      I've attached a small example project to reproduce the error.  

      Attachments

        1. example.zip
          3 kB
          Adam Long

        Activity

          People

            ggregory Gary D. Gregory
            adam@adam-long.net Adam Long
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: