Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1059053

Summary: Portlet in Dashboard is broken for the first access
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: Toshiya Kobayashi <tkobayas>
Component: PortalAssignee: Nobody <nobody>
Status: CLOSED UPSTREAM QA Contact: Tomas Kyjovsky <tkyjovsk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.2.2.GACC: epp-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1059036 Environment:
Last Closed: 2025-02-10 03:34:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Byteman script to simulate slow dashboard creation
none
slowCommitAfterHttpResponse.rule none

Description Toshiya Kobayashi 2014-01-29 04:40:36 UTC
+++ This bug was initially created as a clone of Bug #1059036 +++

Description of problem:

If you configure a richfaces portlet in dashboard template, the portlet may break for the first access by a newly created user.

How reproducible:

Not always. You can constantly reproduce it by using debugger.

Steps to Reproduce:

You need to use debugger to constantly reproduce the issue with richFacesPortlet.war. I think if use a simple richfaces portlet, you can easily reproduce without debugger.

- Deploy jboss-epp-5.2.2/portletbridge/examples/richFacesPortlet.war
- Edit gatein.ear/02portal.war/WEB-INF/conf/portal/user/template/user/pages.xml

<page-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0 http://www.gatein.org/xml/ns/gatein_objects_1_0"
        xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">

        <!-- The default dashboard page -->
        <page>
                <name>Tab_Default</name>
                <title>Tab_Default</title>
        <portlet-application>
        <portlet>
                <application-ref>richFacesPortlet</application-ref>
                <portlet-ref>richFacesPortlet</portlet-ref>
        </portlet>
        <access-permissions>Everyone</access-permissions>
        <show-info-bar>false</show-info-bar>
        </portlet-application>
        </page>
</page-set>

- Start EPP
- Login as root
- [Application Registry]->[Import applications]
- Logout
- Login as john
- Set breakpoints at:
-- org.exoplatform.portal.application.PortalRequestHandler [line: 185] - processRequest(PortalRequestContext, PortalApplication)	
-- org.exoplatform.portal.application.UserSiteLifeCycle [line: 66] - onStartRequest(Application, PortalRequestContext)	
- Access to Dashboard
- The first request (Thread A) stops at UserSiteLifeCycle line 66. DataStorage cannot find PortalConfig so UserPortalConfigService.createUserSite() is called. It should persist the PortalConfig to JCR but *it's not committed yet*.
- Resume Thread A with debugger
- The request stops at PortalRequestHandler line 185. Portal responded to browser but JCR is not committed yet.
- Several requests (Thread B, C,...) from browser come into UserSiteLifeCycle line 66. "Step Over" Thread B to proceed 1 line. DataStorage cannot find PortalConfig yet so UserPortalConfigService.createUserSite() is called.
- Resume Thread A with debugger
- Turn off all breakpoints
- Resume all threads with debugger
- Those threads will throw NoSuchDataException at some point because the ID (PortletContext) is deleted during UserPortalConfigService.createUserSite()

Actual results:

- You will see the following ERROR message in server side

2014-01-22 11:24:29,989 ERROR [portal:UIPortletLifecycle] (http-0.0.0.0-8080-1) Portlet render threw an exception
org.exoplatform.services.portletcontainer.PortletContainerException: org.exoplatform.portal.config.NoSuchDataException: Can not find b7c32f74c0a80a8250131224537112e6
        at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:336)
        at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:62)
        at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:144)
...
Caused by: org.exoplatform.portal.config.NoSuchDataException: Can not find b7c32f74c0a80a8250131224537112e6
        at org.exoplatform.portal.pom.config.POMSession.findCustomizationById(POMSession.java:214)
        at org.exoplatform.portal.pom.config.tasks.PreferencesTask$Load.run(PreferencesTask.java:91)
        at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:405)
        at org.exoplatform.portal.pom.config.ExecutorDispatcher.execute(ExecutorDispatcher.java:60)
        at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)
        at org.exoplatform.portal.pom.config.cache.DataCache.read(DataCache.java:208)
        at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:61)
        at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)
        at org.exoplatform.portal.pom.config.cache.PortalNamesCache.execute(PortalNamesCache.java:77)
        at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:253)
        at org.exoplatform.portal.pom.config.POMDataStorage.load(POMDataStorage.java:176)
        at org.exoplatform.portal.config.DataStorageImpl.load(DataStorageImpl.java:111)
        at org.exoplatform.portal.webui.application.ModelAdapter$1.getPortletContext(ModelAdapter.java:89)
        at org.exoplatform.portal.webui.application.UIPortlet.getPortletContext(UIPortlet.java:997)
        at org.exoplatform.portal.webui.application.UIPortlet.create(UIPortlet.java:833)
        at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:212)
        ... 146 more

- You may see some parts are broken in the portlet

Expected results:

Dashboard and its portlet are displayed without an issue

Comment 2 Martin Weiler 2015-05-06 10:28:06 UTC
Created attachment 1022571 [details]
Byteman script to simulate slow dashboard creation

Comment 3 Martin Weiler 2015-05-06 10:32:01 UTC
With the attached byteman script, it is possible to force the exception without a debugger. Here are the steps:

(all steps similar to the ones outlined above)
- [Application Registry]->[Import applications]
- Logout

Now, the byteman part:
- Install byteman:
$ bminstall.sh <java_pid>
$ bmsubmit.sh ForceSlowDashboardCreation.btm

- Login as john
- Access the Dashboard

BOOM:

12:26:56,816 INFO  [STDOUT] http-127.0.0.1-8080-3 BYTEMAN ==> createUserSite for john simulating slow creation...
12:26:57,816 INFO  [STDOUT] http-127.0.0.1-8080-3 BYTEMAN ==> createUserSite for john continuing
12:26:59,039 INFO  [STDOUT] http-127.0.0.1-8080-1 BYTEMAN ==> createUserSite for john simulating slow creation...
12:26:59,042 INFO  [STDOUT] http-127.0.0.1-8080-4 BYTEMAN ==> createUserSite for john simulating slow creation...
12:26:59,042 INFO  [STDOUT] http-127.0.0.1-8080-5 BYTEMAN ==> createUserSite for john simulating slow creation...
12:26:59,051 INFO  [STDOUT] http-127.0.0.1-8080-6 BYTEMAN ==> createUserSite for john simulating slow creation...
12:27:00,039 INFO  [STDOUT] http-127.0.0.1-8080-1 BYTEMAN ==> createUserSite for john continuing
12:27:00,050 INFO  [STDOUT] http-127.0.0.1-8080-4 BYTEMAN ==> createUserSite for john continuing
12:27:00,050 INFO  [STDOUT] http-127.0.0.1-8080-5 BYTEMAN ==> createUserSite for john continuing
12:27:00,053 INFO  [STDOUT] http-127.0.0.1-8080-6 BYTEMAN ==> createUserSite for john continuing
12:27:00,468 ERROR [portal:UIPortletLifecycle] Error processing the action: Can not find 28c39e30c0a862217137890498128a7f
org.exoplatform.portal.config.NoSuchDataException: Can not find 28c39e30c0a862217137890498128a7f
	at org.exoplatform.portal.pom.config.POMSession.findCustomizationById(POMSession.java:214)
	at org.exoplatform.portal.pom.config.tasks.PreferencesTask$Load.run(PreferencesTask.java:91)
	at org.exoplatform.portal.pom.config.POMSession.execute(POMSession.java:405)
	at org.exoplatform.portal.pom.config.ExecutorDispatcher.execute(ExecutorDispatcher.java:44)
	at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)
	at org.exoplatform.portal.pom.config.cache.DataCache.read(DataCache.java:208)
	at org.exoplatform.portal.pom.config.cache.DataCache.execute(DataCache.java:61)
	at org.exoplatform.portal.pom.config.TaskExecutionDecorator.execute(TaskExecutionDecorator.java:38)
	at org.exoplatform.portal.pom.config.cache.PortalNamesCache.execute(PortalNamesCache.java:77)
	at org.exoplatform.portal.pom.config.POMSessionManager.execute(POMSessionManager.java:253)
	at org.exoplatform.portal.pom.config.POMDataStorage.load(POMDataStorage.java:176)
	at org.exoplatform.portal.config.DataStorageImpl.load(DataStorageImpl.java:111)

Comment 4 Toshiya Kobayashi 2015-05-28 07:32:16 UTC
Created attachment 1031065 [details]
slowCommitAfterHttpResponse.rule

Hi Martin,

I was not able to reproduce the issue with ForceSlowDashboardCreation.btm. I think it doesn't ensure slowdown after http response.

Instead, I attached slowCommitAfterHttpResponse.rule which works for me.

Comment 7 Red Hat Bugzilla 2025-02-10 03:34:57 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.