Jetspeed 2
  1. Jetspeed 2
  2. JS2-1085

Category Portlet Selector Edit Mode NPE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.1
    • Component/s: Customizer
    • Labels:
      None

      Description

      Category Portlet Selector throws an NPE when you go into Edit Mode and add a new "Category".

        Activity

        Hide
        David Sean Taylor added a comment -

        Summary: A Bug surfaced in Category Portlet Selector when storing defaults, the selector threw an NPE during store to persistent preferences. Discovered that the selector was still coded against 2.1.3 apis, and needed to be updated. Then discovered the PortletDefinitionImpl never keeps a copy of the Preferences collection, but always delegates to the Preferences Provider to retrieve preferences, and then wrappers the result from the provider with every accessor call. The selector was often dereferencing the prefs collection. This should not be a problem in a normal transactional environment... For now, the problem can be avoided by only dereferencing once, making manipulations to the held Preferences, and then 'committing' with a new storeDefaults api which takes a second Preferences handle. Also got bogged down in an OJB debugging session that turned out to be a simple typo in the OJB mapping file (username is not a primary key).

        Show
        David Sean Taylor added a comment - Summary: A Bug surfaced in Category Portlet Selector when storing defaults, the selector threw an NPE during store to persistent preferences. Discovered that the selector was still coded against 2.1.3 apis, and needed to be updated. Then discovered the PortletDefinitionImpl never keeps a copy of the Preferences collection, but always delegates to the Preferences Provider to retrieve preferences, and then wrappers the result from the provider with every accessor call. The selector was often dereferencing the prefs collection. This should not be a problem in a normal transactional environment... For now, the problem can be avoided by only dereferencing once, making manipulations to the held Preferences, and then 'committing' with a new storeDefaults api which takes a second Preferences handle. Also got bogged down in an OJB debugging session that turned out to be a simple typo in the OJB mapping file (username is not a primary key ).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development