You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by je...@jakarta.apache.org on 2004/08/04 22:39:20 UTC

[jira] Commented: (JS2-103) Registry initialization on automatic deployment invalid/not the same as after loading from db.

The following comment has been added to this issue:

     Author: Ate Douma
    Created: Wed, 4 Aug 2004 1:39 PM
       Body:
LanguageSet null problem right after hot deployment fixed in PortletDefinitionImpl
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JS2-103?page=comments#action_37037

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JS2-103

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JS2-103
    Summary: Registry initialization on automatic deployment  invalid/not the same as after loading from db.
       Type: Bug

     Status: Open
   Priority: Major

    Project: Jetspeed 2
   Versions:
             2.0-dev/cvs

   Assignee: Ate Douma
   Reporter: Ate Douma

    Created: Wed, 4 Aug 2004 1:19 PM
    Updated: Wed, 4 Aug 2004 1:39 PM
Environment: 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.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org