Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4999

Can't get OgnlValueStack log even if enable logMissingProperties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.17
    • 2.5.22, 6.0.0
    • Value Stack
    • None

    Description

      I'm in devMode, enabled logMissingProperties and expect to see missing property warning in the log. I was surprised that I can't get the missing property log even if logMissingProperties is set true. The application run smoothly and skip the missing property - as expected though.

      In another run, I enabled both logMissingProperties and throwExceptionOnFailure. This time the application crash at the missing property and I can get both logs and exception.

      After I dive deeper using debugger, I convince myself the config is good, since devMode and logMissingProperties are true at runtime in OgnlValueStack.

      I was confused, why we can't get missing property log without throwing OgnlException? 

      Are we able to enter handleOgnlException(String expr, boolean throwExceptionOnFailure, OgnlException e)  at all if throwExceptionOnFailure is false, in which my expected log is written?

      Attachments

        Issue Links

          Activity

            People

              yasserzamani Yasser Zamani
              qqu0127 Quincy Qu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: