Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-128866

Exceptions can still occur when updating FreeMarker Engine settings

    Details

      Description

      Context
      Reproducing the issue relies on a race condition.

      Steps to Reproduce (Using Debugger)

      1. Navigate to Control Panel -> System Settings -> Template Engines -> Freemarker Engine
      2. Add thread breakpoint and enable
      3. Click Update

      Expected Result
      The page displays normally and no errors are shown in the logs

      Actual Result
      The page displays a 500 error and NullPointerException errors are shown in the logs


      Steps to Reproduce (Using Curl)

      1. Navigate to Control Panel -> System Settings -> Template Engines -> Freemarker Engine
      2. Run the following terminal command:
        seq 1 2000 | xargs -n1 -P2 curl --silent --output /dev/null http://localhost:8080/widget/web/guest/home/-/com_liferay_portal_search_web_search_bar_portlet_SearchBarPortlet_INSTANCE_templateSearch 
        
        • Runs curl in 2 parallel streams for 2000 requests for the search bar portlet
        • 2000 requests is arbitrary and just gives us more time to click Update
      3. Click Update
      4. Inspect logs
      5. Repeat steps 3-4 a few times if errors aren't shown

      Expected Result
      No errors are shown in the logs

      Actual Result
      TemplateException+IllegalStateException errors are thrown in the logs

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sharry.shi Sharry Shi
              Reporter:
              eric.yan Eric Yan
              Participants of an Issue:
              Recent user:
              Sophia Zhang
              Engineering Assignee:
              Tina Tian
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                37 weeks, 4 days ago

                  Packages

                  Version Package
                  7.4.0 CE GA1 DXP 7,4
                  7.4.13 DXP GA1
                  Master