[gatein-issues] [JBoss JIRA] Reopened: (GTNPORTAL-1541) Concurreny problem - NullPointerException in BreadcumbsPortlet during performance test

Marek Posolda (JIRA) jira-events at lists.jboss.org
Tue Nov 16 06:52:45 EST 2010


     [ https://jira.jboss.org/browse/GTNPORTAL-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marek Posolda reopened GTNPORTAL-1541:
--------------------------------------



I am reopening issue because sometimes  I am still seeing the problem and exceptions in log. 

Problem can occur when client1 go to synchronize block and create eventMap, but client2 is not forced to go to synchronized block and he can see eventMap before its fully initialized by client1. This means that client2 is not seeing listener and this listener is not called for him.

> Concurreny problem - NullPointerException in BreadcumbsPortlet during performance test
> --------------------------------------------------------------------------------------
>
>                 Key: GTNPORTAL-1541
>                 URL: https://jira.jboss.org/browse/GTNPORTAL-1541
>             Project: GateIn Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: WebUI
>    Affects Versions: 3.1.0-GA
>         Environment: GateIn trunk (revision 4282) on EAP5
>            Reporter: Marek Posolda
>            Assignee: Minh Hoang TO
>              Labels: portal-s41, worked
>             Fix For: 3.2.0-GA
>
>         Attachments: .classpath, GTNPORTAL-1541-01-11-2010.patch, GTNPORTAL-1541-01112010
>
>   Original Estimate: 6 hours
>  Remaining Estimate: 6 hours
>
> Sometimes during performance test, I am seeing NPE exception in server log, thrown from UIBreadcumbsPortlet. Exception stacktrace is:
> 2010-10-06 09:11:15,589 ERROR [org.exoplatform.webui.application.portlet.PortletApplicationController] (http-127.0.0.1-8080-4) Error while rendering the porlet
> java.lang.NullPointerException
>         at org.exoplatform.portal.webui.component.UIBreadcumbsPortlet.loadSelectedPath(UIBreadcumbsPortlet.java:69)
>         at org.exoplatform.portal.webui.component.UIBreadcumbsPortlet.renderChildren(UIBreadcumbsPortlet.java:89)
>         at org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle.processRender(UIApplicationLifecycle.java:73)
>         at org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle.processRender(UIApplicationLifecycle.java:31)
>         at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:144)
>         at org.exoplatform.webui.core.UIPortletApplication.processRender(UIPortletApplication.java:146)
>         at org.exoplatform.webui.application.portlet.PortletApplication.render(PortletApplication.java:253)
>         at org.exoplatform.webui.application.portlet.PortletApplicationController.render(PortletApplicationController.java:110)
>         at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:569)
> Whole test log is attached in related issue JBEPP-459 for completeness. It is not occuring in every performance test but only sometimes, so concurreny issue came to my mind first.
> I did more investigation and I founded that the cause of problem is in thread-unsafe call of method "getUIComponentEventConfig" on class "org.exoplatform.webui.config.Component". 
> Problem can be seen if client1 calls this method and eventsMap is null -> eventsMap is going to initialize during this call. 
> But when client2 calls this method before initialization of map by client1 is finished, then problem can happen because eventsMap is not fully initialized for client2 -> client2 can't find ChangePageNode event -> listener UIPageActionListener.ChangePageNodeActionListener is not called for client2 -> UIPortal of client2 has unitialized variables selectedNode and selectedPath -> NullPointerException is thrown for client2 during rendering of BreadcumbsPortlet, because UIPortal.selectedPath is null.
> Steps to reproduce (with usage of Eclispe IDE):
> - Add breakpoint to class org.exoplatform.webui.config.Component to line 184 (after call of eventMap = new HashMap<String, Event>() )
> - Open browser1 and go to localhost:8080/portal/public/classic . Client will be stopped on breakpoint
> - Open browser2 and go to localhost:8080/portal/public/classic . This client is not seeing ChangePageNode event and so NPE is thrown for him in UIBreadcumbsPortlet.
> Note: Method getUIComponentEventConfig is called many times during single HTTP request. So is it possible to fix this issue by other way that full initialization of this method? Because it can have bad impact on performance. I  wonder if it's possible to initialize eventsMap in constructor of Component class (only suggestion)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the gatein-issues mailing list