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

Bug 877560

Summary: RichFaces Showcase portlet throws Exception when switching skins multiple times
Product: [JBoss] JBoss Enterprise Portal Platform 6 Reporter: Ken Finnigan <kfinniga>
Component: PortletBridgeAssignee: hfnukal <hfnukal>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.xCC: bdawidow, epp-bugs, pmensik
Target Milestone: ---   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
JSF Component events were being retained between an Action and a Render of the portlet on the UIViewRoot. Removing or adding JSF components in the page was occurring twice, which caused exceptions about components no longer being present or already added. The JSF Mojarra implementation is now updated to remove events that may be present when setting a UIViewRoot directly onto the FacesContext, as is the case with PortletBridge. Exceptions about components being removed or added too many times no longer occur, and the page now behaves as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-07 14:23: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:

Description Ken Finnigan 2012-11-16 21:27:56 UTC
Following exception is seen when changing skins for the second time immediately after the first:


Caused by: javax.faces.FacesException: Cannot remove the same component twice: pbG9dea276d_2dee9e_2d4150_2dad91_2d22255b5a57d2_j_id1:j_idt444
	at com.sun.faces.context.StateContext$AddRemoveListener.handleAddRemoveWithAutoPrune(StateContext.java:489) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
	at com.sun.faces.context.StateContext$AddRemoveListener.handleRemove(StateContext.java:371) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
	at com.sun.faces.context.StateContext$AddRemoveListener.processEvent(StateContext.java:334) [jsf-impl-2.1.13-redhat-1.jar:2.1.13-redhat-1]
	at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106) [jboss-jsf-api_2.1_spec-2.0.7.Final-redhat-1.jar:2.0.7.Final-redhat-1]

Investigating this problem lead to determining that it was caused by the need for Portlet Bridge to retain the UIViewRoot from JSF between requests, and the list of ADDED/REMOVED components being retained between requests, making JSF believe it was removing a component for the second time when it fact it wasn't.

This has been raised as http://java.net/jira/browse/JAVASERVERFACES-2609 against the Mojarra JSF implementation.

There is also a tracker on AS7 jira to have the fix added when it's available: https://issues.jboss.org/browse/AS7-5970

Comment 1 Boleslaw Dawidowicz 2012-11-19 10:43:44 UTC
So to make it clear there is nothing we can do with this issue at this point - until it gets fixed in EAP. 

This may need to be postponed after JPP 6

Comment 2 JBoss JIRA Server 2013-04-01 23:31:00 UTC
Stan Silvert <ssilvert> made a comment on jira AS7-5970

Are you guys satisfied that this is fixed now that JAVASERVERFACES-2609 is done?  Upstream fix should be integrated now.  Can we close this?

Comment 3 JBoss JIRA Server 2013-04-02 13:07:37 UTC
Ken Finnigan <ken> made a comment on jira AS7-5970

I don't see a problem with that. Safe to close from my perspective

Comment 4 JBoss JIRA Server 2013-04-02 17:09:25 UTC
Stan Silvert <ssilvert> updated the status of jira AS7-5970 to Resolved

Comment 5 Boleslaw Dawidowicz 2013-04-17 07:58:53 UTC
According to JIRA/BZ this is resolved in EAP 6.1 Alpha