You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2021/07/29 12:41:00 UTC

[jira] [Resolved] (LOG4J2-3131) Attempting to call getExtendedStackTraceAsString() after deserializing JSON LogEvent results in a NPE

     [ https://issues.apache.org/jira/browse/LOG4J2-3131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory resolved LOG4J2-3131.
-------------------------------------
    Fix Version/s: 3.0.0.
                   2.15.0
       Resolution: Fixed

> Attempting to call getExtendedStackTraceAsString() after deserializing JSON LogEvent results in a NPE
> -----------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3131
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3131
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>    Affects Versions: 2.14.1
>            Reporter: Adam Long
>            Assignee: Gary D. Gregory
>            Priority: Major
>             Fix For: 2.15.0, 3.0.0.
>
>         Attachments: example.zip
>
>
> How to reproduce:
>  # Generate a LogEvent with an Exception that has at least one cause (i.e. nested Exception)
>  # Use the standard JSON Layout to turn that LogEvent into JSON
>  # Using JsonLogEventParser to turn it back into a LogEvent
>  # Call getExtendedStackTraceAsString() on the ThrowableProxy associated with the deserialized LogEvent
>  # A NullPointerException will be thrown
> I've attached a small example project to reproduce the error.  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)