Bug 1080249 - RichFaces is not defined after adding a RF portlet to a page
Summary: RichFaces is not defined after adding a RF portlet to a page
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER03
: 6.2.0
Assignee: Lucas Ponce
QA Contact: Marek Baluch
URL:
Whiteboard:
Depends On:
Blocks: 1080254
TreeView+ depends on / blocked
 
Reported: 2014-03-25 03:12 UTC by Toshiya Kobayashi
Modified: 2025-02-10 03:35 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
: 1080254 (view as bug list)
Environment:
Last Closed: 2025-02-10 03:35:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
RichFaces_is_not_defined.png (295.27 KB, image/png)
2014-03-25 03:14 UTC, Toshiya Kobayashi
no flags Details
620DR2_after_edit.png (123.63 KB, image/png)
2014-04-03 10:15 UTC, Toshiya Kobayashi
no flags Details
620DR2_after_edit_and_goto_home.png (430.21 KB, image/png)
2014-04-03 10:15 UTC, Toshiya Kobayashi
no flags Details
slowDB.rule (209 bytes, text/plain)
2014-04-30 06:12 UTC, Toshiya Kobayashi
no flags Details
jsf2-rf4-hello-world-portlet.war (8.11 MB, application/x-webarchive)
2014-04-30 06:13 UTC, Toshiya Kobayashi
no flags Details
step8exceptions.log (109.99 KB, text/x-log)
2014-04-30 08:14 UTC, vramik
no flags Details
standalone.xml (17.46 KB, text/xml)
2014-04-30 10:19 UTC, vramik
no flags Details
620ER2_after_edit.png (119.09 KB, image/png)
2014-05-14 09:12 UTC, Toshiya Kobayashi
no flags Details
620ER2_after_edit_and_goto_home.png (429.31 KB, image/png)
2014-05-14 09:14 UTC, Toshiya Kobayashi
no flags Details
RichFaces portlet normal request and response (119.70 KB, image/png)
2014-05-14 15:46 UTC, Lucas Ponce
no flags Details
RichFaces portlet bad request and response (byteman slow DB) (129.76 KB, image/png)
2014-05-14 15:47 UTC, Lucas Ponce
no flags Details
Thread trace in byteman slowDB scenario (6.48 KB, text/x-log)
2014-05-15 18:12 UTC, Lucas Ponce
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GTNPORTAL-2581 0 Major Open RichFaces is not defined after adding a RF portlet to a page 2017-10-24 09:22:54 UTC
Red Hat Issue Tracker GTNPORTAL-3484 0 Major Resolved Commit changes for a page before send response 2017-10-24 09:22:54 UTC

Description Toshiya Kobayashi 2014-03-25 03:12:29 UTC
Description of problem:

Platform BZ for https://issues.jboss.org/browse/GTNPORTAL-2581

How reproducible:

Not always. A debugger helps to reproduce the issue constantly.


Steps to Reproduce:
1. Build and deploy jsf2-rf4-hello-world-portlet quickstart.
2. Import jsf2-rf4-hello-world-portlet via Application Registry
3. Add an empty page ([Site Editor]->[Add New Page])
4. Edit the page ([Site Editor]->[Edit Page])
5. Drag&Drop jsf2-rf4-hello-world-portlet
6. Attach a debugger and set a breakpoint at PortalRequestHandler.java line.237.
====
234         } finally {
235 
236             // We close the writer here once and for all
237             Safe.close(context.getWriter());
238 
239             //
240             try {
241                 for (ApplicationLifecycle lifecycle : lifecycles)
242                     lifecycle.onEndRequest(app, context);
243             } catch (Exception exception) {
====
7. Click save icon in portal
8. Debugger stops at PortalRequestHandler line.237.
9. Disable the breakpoint and 'step over' the execution in debugger
10. Then 'resume' the debugger


Actual results:

The browser displays a pop-up "RichFaces is not defined". See attached "RichFaces_is_not_defined.png"

Expected results:

The page is properly rendered with the portlet

Comment 1 Toshiya Kobayashi 2014-03-25 03:14:16 UTC
Created attachment 878296 [details]
RichFaces_is_not_defined.png

Comment 2 Toshiya Kobayashi 2014-03-25 03:18:31 UTC
The issue is similar to BZ1059036. I wonder which is the problem --- "the architecture which responds before commit" or "ajaxRequest=true".

Comment 3 Toshiya Kobayashi 2014-04-03 10:14:37 UTC
Testing with 6.2.0.DR2, I see the phenomenon is different.

Actual results:

The browser doesn't display a pop-up "RichFaces is not defined".

But the portlet appearance is broken. See attached "620DR2_after_edit.png".

Then I move to home page by clicking navigation, a pop-up is raised with a message "This portlet does not exist anymore, please refresh your browser". See attached "620DR2_after_edit_and_goto_home.png".

Comment 4 Toshiya Kobayashi 2014-04-03 10:15:20 UTC
Created attachment 882208 [details]
620DR2_after_edit.png

Comment 5 Toshiya Kobayashi 2014-04-03 10:15:50 UTC
Created attachment 882209 [details]
620DR2_after_edit_and_goto_home.png

Comment 6 Toshiya Kobayashi 2014-04-03 10:21:47 UTC
Note: I set a breakpoint at PortalRequestHandler line.255 for 6.2.0.DR2. Other steps are the same.

Comment 7 Juraci Paixão Kröhling 2014-04-03 17:50:39 UTC
Unfortunately, I'm still unable to reproduce this issue. I've tried with 6.1.1, master and 6.2.0.DR2, without success. I've requested assistance from QA, so that they can also try to reproduce this issue. It would also be interesting to see if you can reproduce this issue on Fedora 20 with all updates.

Comment 8 vramik 2014-04-08 14:04:17 UTC
Hi,

I was not able to reproduce it as well. After resuming the debugger everything works as expected. None of the described issues happened in my environment.

Comment 10 Toshiya Kobayashi 2014-04-09 09:48:23 UTC
Reproduced the issue in RHJP 6.1.1 by my colleague. So far the environments we have reproduced are:

Fedora 17 / Oracle JDK 1.7.0_45 / Firefox 21
Fedora 17 / Oracle JDK 1.7.0_45 / Chrome 24
Fedora 20 / Oracle JDK 1.6.0_45 / Firefox 28
Fedora 20 / OpenJDK 1.7.0_51  / Firefox 28

I think the problem is not environment but steps:

=====
8. Debugger stops at PortalRequestHandler line.237. (Safe.close(context.getWriter());)

 -> This means stopping before responding to browser

9. Disable the breakpoint and 'step over' the execution in debugger

 -> By 'step over', the thread proceeds *1 line* so it responds to the browser then some http requests will come in before JCR commit. Need to make sure to disable the breakpoint for the subsequent threads not to stop.

10. Then 'resume' the debugger
=====

Does the above explanation meet the steps you executed?

Comment 16 Toshiya Kobayashi 2014-04-30 06:12:12 UTC
Created attachment 891016 [details]
slowDB.rule

Comment 17 Toshiya Kobayashi 2014-04-30 06:13:38 UTC
Created attachment 891017 [details]
jsf2-rf4-hello-world-portlet.war

Comment 18 Toshiya Kobayashi 2014-04-30 06:21:01 UTC
Here is another reproduce step which is easier.

1. Start RHJP 6.1.1
2. Build and deploy jsf2-rf4-hello-world-portlet quickstart.
3. Import jsf2-rf4-hello-world-portlet via Application Registry
4. Add an empty page ([Site Editor]->[Add New Page]) *** It's important to "Add an empty page and then edit the page" ***
5. Edit the page ([Site Editor]->[Edit Page])
6. Drag&Drop jsf2-rf4-hello-world-portlet
7. Apply Byteman and submit slowDB.rule.
 - bin/bminstall.sh <jboss_pid>
 - bin/bmsubmit.sh -l slowDB.rule
8. Click Finish icon in portal
 -> You will see lots of "sleeping 100ms" log in STDOUT
 -> You will finally see a pop-up "RichFaces is not defined"

I attached slowDB.rule and jsf2-rf4-hello-world-portlet.war.

slowDB.rule is just emulating slow database so it will result in 'Subsequent http accesses come in before JCR commit'.

Vlasta, could you please try this with RHJP 6.1.1? If QE cannot reproduce the issue with released version (6.1.1), this BZ cannot go forward.

Thanks!
Toshiya

Comment 19 vramik 2014-04-30 08:14:42 UTC
Created attachment 891065 [details]
step8exceptions.log

Hi *,

I've followed the another steps and I got some exceptions in log in step 8 (attaching), but I was not able to see the "RichFaces is not defined" pop-up in my env.

Comment 20 Toshiya Kobayashi 2014-04-30 09:47:14 UTC
Hmm, I tried various sleep time but cannot reproduce the lock timeout on my side.

Could you attach your standalone.xml?

Also please give it one more try with 50ms sleep by editing slowDB.rule?

Thanks!

Comment 21 vramik 2014-04-30 10:19:35 UTC
Created attachment 891099 [details]
standalone.xml

I've tried 50ms, but I got lock timeout anyway. Attaching standalone.xml

Comment 23 Toshiya Kobayashi 2014-05-01 03:33:14 UTC
Thanks Vlasta,

I have no idea why it's not reproducible on your side. I will just test when ER2 is out.

Comment 24 Toshiya Kobayashi 2014-05-14 09:12:37 UTC
Created attachment 895413 [details]
620ER2_after_edit.png

Comment 25 Toshiya Kobayashi 2014-05-14 09:14:04 UTC
Created attachment 895415 [details]
620ER2_after_edit_and_goto_home.png

Comment 26 Toshiya Kobayashi 2014-05-14 09:15:19 UTC
I tested with 6.2.0.ER2 and reproduced the issue. The result was the same as DR2. Attached screenshots (620ER2_after_edit.png / 620ER2_after_edit_and_goto_home.png).

Comment 30 Lucas Ponce 2014-05-14 15:46:14 UTC
Created attachment 895528 [details]
RichFaces portlet normal request and response

Comment 31 Lucas Ponce 2014-05-14 15:47:13 UTC
Created attachment 895529 [details]
RichFaces portlet bad request and response (byteman slow DB)

Comment 35 Lucas Ponce 2014-05-15 18:12:30 UTC
Created attachment 896038 [details]
Thread trace in byteman slowDB scenario

Comment 37 Lucas Ponce 2014-05-20 08:57:24 UTC
Fix send to master and 3.8.x branches.

Comment 39 Peter Palaga 2014-05-27 12:42:57 UTC
https://github.com/gatein/gatein-portal/pull/856 was merged in upstream

Comment 43 Petr Mensik 2014-06-17 08:50:57 UTC
I was able to perform testing with Byteman without any issues so I consider this resolved.

Comment 48 Red Hat Bugzilla 2025-02-10 03:35:26 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


Note You need to log in before you can comment on or make changes to this bug.