Uploaded image for project: 'Jetspeed 2'
  1. Jetspeed 2
  2. JS2-931

ConcurrentModificationException Exception in SessionNavigationalState

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.1.3, 2.2-M1
    • Fix Version/s: 2.1.4, 2.2.0
    • Component/s: Container
    • Labels:
      None
    • Environment:
      Jetspeed 2.1.2

      Description

      This issue can only be reproduced if a user very rapidly interacts with the same portal page without waiting for the previous interaction to be completed.

      1. JS2-931-2.1.2-POSTRELEASE.patch.txt
        7 kB
        Joachim Müller
      2. JS2-931-2.1.3-POSTRELEASE.patch.txt
        7 kB
        Joachim Müller
      3. JS2-931.patch.txt
        0.9 kB
        Joachim Müller

        Activity

        Hide
        joachim_mueller Joachim Müller added a comment -

        Do you have an exception trace, to quickly narrow the problem down?

        Show
        joachim_mueller Joachim Müller added a comment - Do you have an exception trace, to quickly narrow the problem down?
        Hide
        adouma Ate Douma added a comment -

        Yes, we encountered this on a Websphere 6.1.0.9 installation using the latest 2.1.2-postrelease branch with parallel rendering enabled.

        Stacktrace:

        java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:842)
        at java.util.HashMap$KeyIterator.next(HashMap.java:878)
        at org.apache.jetspeed.container.state.impl.PortletWindowSessionNavigationalStates.sync(PortletWindowSessionNavigationalStates.java:235)
        at org.apache.jetspeed.container.state.impl.SessionNavigationalState.sync(SessionNavigationalState.java:123)
        at org.apache.jetspeed.container.state.impl.SessionFullExtendedNavigationalState.sync(SessionFullExtendedNavigationalState.java:84)
        at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)

        Show
        adouma Ate Douma added a comment - Yes, we encountered this on a Websphere 6.1.0.9 installation using the latest 2.1.2-postrelease branch with parallel rendering enabled. Stacktrace: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:842) at java.util.HashMap$KeyIterator.next(HashMap.java:878) at org.apache.jetspeed.container.state.impl.PortletWindowSessionNavigationalStates.sync(PortletWindowSessionNavigationalStates.java:235) at org.apache.jetspeed.container.state.impl.SessionNavigationalState.sync(SessionNavigationalState.java:123) at org.apache.jetspeed.container.state.impl.SessionFullExtendedNavigationalState.sync(SessionFullExtendedNavigationalState.java:84) at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)
        Hide
        joachim_mueller Joachim Müller added a comment -

        The attached patches address the problem. For the trunk, a java.util.concurrent.ConcurrentHashMap is used, the older versions must use Collections.synchronizedMap(..) with synchronizing the iterations .

        Please review.

        Show
        joachim_mueller Joachim Müller added a comment - The attached patches address the problem. For the trunk, a java.util.concurrent.ConcurrentHashMap is used, the older versions must use Collections.synchronizedMap(..) with synchronizing the iterations . Please review.
        Hide
        firevelocity Vivek Kumar added a comment -

        Thanks Joachim
        For that patch, we will review and apply it.

        Show
        firevelocity Vivek Kumar added a comment - Thanks Joachim For that patch, we will review and apply it.
        Hide
        firevelocity Vivek Kumar added a comment -

        Patch applied

        Show
        firevelocity Vivek Kumar added a comment - Patch applied
        Hide
        joachim_mueller Joachim Müller added a comment -

        Thanks Vivek for applying the patch. I suggest to use a java.util.concurrent.ConcurrentHashMap for the trunk because the performance is suppose to be much better than the Collections.synchronizedMap solution. Can we use JAVA5 specifics for the trunk?

        Show
        joachim_mueller Joachim Müller added a comment - Thanks Vivek for applying the patch. I suggest to use a java.util.concurrent.ConcurrentHashMap for the trunk because the performance is suppose to be much better than the Collections.synchronizedMap solution. Can we use JAVA5 specifics for the trunk?
        Hide
        taylor David Sean Taylor added a comment -

        > Can we use JAVA5 specifics for the trunk?

        yes

        Show
        taylor David Sean Taylor added a comment - > Can we use JAVA5 specifics for the trunk? yes

          People

          • Assignee:
            firevelocity Vivek Kumar
            Reporter:
            firevelocity Vivek Kumar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development