Jetspeed 2
  1. Jetspeed 2
  2. JS2-646

ActionValveImpl can throw NullPointerException under clustered environment.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1-dev, 2.1
    • Component/s: Components Core
    • Labels:
      None
    • Environment:

      Description

      When servlet containers are clustered, ActionValveImpl can throw NullPointerException as follows:

      ActionValveImpl.java:initWindow.window.getPortletEntity()[null]
      java.lang.NullPointerException
      at org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.initWindow(ActionValveImpl.java:187)
      at org.apache.jetspeed.pipeline.valve.impl.ActionValveImpl.invoke(ActionValveImpl.java:88)
      at org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:166)
      at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:77)
      ...

      The reason why this symptom occurs is that the cache for portlet windows is shared among containers, but the portlet entity for a portlet window cannot be synchronized among containers.
      So, a portlet window can be retrieved from the cache, but its portlet entity can be null.

      Therefore, I added a path to check if portlet entity is null, and to refresh the portlet window with validated portlet entity. See my patch.

        Activity

        Hide
        Ate Douma added a comment -

        Closed again now properly recorded against Fix Version 2.1 as well

        Show
        Ate Douma added a comment - Closed again now properly recorded against Fix Version 2.1 as well
        Hide
        David Sean Taylor added a comment -

        this patch has been applied for a while now without further report of issue

        Show
        David Sean Taylor added a comment - this patch has been applied for a while now without further report of issue
        Hide
        Woonsan Ko added a comment -

        My patch as described in this issue description.

        Show
        Woonsan Ko added a comment - My patch as described in this issue description.

          People

          • Assignee:
            David Sean Taylor
            Reporter:
            Woonsan Ko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development