]
Marek Posolda updated GTNPORTAL-650:
------------------------------------
Attachment: configuration-jboss.properties
Attached files with configuration.properties, screenshot and exception stacktrace.
NPE in clustered setup when rendering portal navigation
-------------------------------------------------------
Key: GTNPORTAL-650
URL:
https://jira.jboss.org/jira/browse/GTNPORTAL-650
Project: GateIn Portal
Issue Type: Bug
Affects Versions: 3.0.0-Beta05
Reporter: Prabhat Jha
Fix For: 3.0.0-GA
Attachments: cluster-profile_portal-change.png,
cluster-profile_portal-change_-stacktrace.txt, configuration-jboss.properties
Pasting what Marek wrote in mailing list:
I founded NullPointerException during failover testing.
Steps to simulate exception
1) Going to
http://localhost:8080/portal/public/classic
2) Login as root
3) Going to
http://localhost:8080/portal/public/FailoverPortal/ (Second portal in my
environment)
Now it can be seen that page is broken (screenshot attached to this mail) and Exception
is in server log (stacktrace attached to this mail). This exception occurs for me only
when running GateIn with clustered profile (-Dexo.profiles=cluster). It's ok with
default local profile. My configuration-jboss.properties are also attached.
I tried to look at cause of this problem. It seems that
Util.getUIPortalApplication().getUserPortalConfig(), which is called from
UIUserToolBarSitePortlet.getPageNavigation, returns instance of old UserPortalConfig,
which has references to PortalConfig and navigations of old portal (portal
"classic" in my case).
And I founded that:
- in local (nonclustered) profile, if logged user switch from one portal to second in
his browser, then LegacyPortalStateManager.restoreUIRootComponent is creating new instance
of UIPortalApplication() with new UserPortalConfig() and bound it to current
PortalRequestContext. Then everythink is fine and no exception occured.
- on cluster profile, new UIPortalApplication() is not created when user swith from one
portal to another. Because in ReplicatingStateManager.restoreUIRootComponent() is new
instance of UIPortalApplication() created only if user login to portal or logout from
portal. So old UIPortalApplication is still bound to portalRequestContext and navigations
for old portal are returned later in UIUserToolBarSitePortlet.getPageNavigation() . So
method UIUserToolBarSitePortlet.getPageNavigation() return null in this case and NPE is
here.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: