Uploaded image for project: 'Jetspeed 2 (Retired)'
  1. Jetspeed 2 (Retired)
  2. JS2-103

Registry initialization on automatic deployment invalid/not the same as after loading from db.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-dev/cvs
    • 2.0-M2
    • None
    • None
    • WindowsXP, J2SE 1.4.2_04, Tomcat 4.1.30

    Description

      I've a portlet.xml without any info or other localized data.
      On deployment (hot) this means that also no language set initialization is done for/in the portletdefinition.
      The current PortletDefinitionImpl wraps the languageSet (a plain collection) in a LanguageSetImpl instance.

      On first request for the current languageSet of the Portlet, as is done from JetspeedPowerTool.getTitle(), the LanguageSetImpl is returned. But, the wrapped collection is then still null and retrieving an iterator from the languageSet then leads to a NullPointerException.

      Once Tomcat is shutdown and restarted again, the PortletDefinitionImpl is loaded from the database. OJB does set an empty collection for the languageSet, wrapped in the LanguageSetImpl, so then the above problem is gone.

      This problem with a null languageSet right after hot deployment is probably can potentially occur with many other child collections for which the same construction is used (parameters, security roles etc) which is quite serious I think.

      Because of my current lack of time I will fix the problem for the languageSet by not setting a null value as collection in the LanguageSetImpl. I think the same fix can be done for the other inner child collection wrappers but leave that open for now.

      Maybe, the whole construction of these inner collection wrappers should be reviewed if not a cleaner solution can be implemented...

      I won't close this issue after just fixing the laguageSet problem.

      Attachments

        Activity

          People

            ate Ate Douma
            ate Ate Douma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: