Bug 1082651 - PBR portlets throws javax.faces.FacesException: Must call associate() before calling activate()
Summary: PBR portlets throws javax.faces.FacesException: Must call associate() before ...
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: PortletBridge
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER02
: 6.2.0
Assignee: Nobody
QA Contact: Tomas Kyjovsky
URL:
Whiteboard:
Depends On:
Blocks: 1064245
TreeView+ depends on / blocked
 
Reported: 2014-03-31 14:47 UTC by Petr Mensik
Modified: 2021-11-14 22:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1075588 0 unspecified VERIFIED CDI portlet throws an exception during deployment 2021-11-14 22:29:42 UTC
Red Hat Bugzilla 1083486 0 unspecified CLOSED Fix for WELD-1415 affects GateIn CDI integration 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1083517 0 unspecified CLOSED Upgrade Weld to 1.1.18.Final from 1.1.17.Final-redhat-1 2021-02-22 00:41:40 UTC

Internal Links: 1083486

Description Petr Mensik 2014-03-31 14:47:18 UTC
Portlets based on JSF and CDI throws "javax.faces.FacesException: Must call associate() before calling activate()" either during deployment (in case of RF Showcase) or during initialization of page with the portlet (cdi-jsf-portlet from quickstarts). Full exception stack can be found here

http://pastebin.com/1itEpby2

Comment 2 Petr Mensik 2014-03-31 14:52:04 UTC
Side note, when I did my own build of https://github.com/jpkrohling/gatein-portal/tree/BZ1075588-CdiBug few days ago in order to check the fix of https://bugzilla.redhat.com/show_bug.cgi?id=1075588, everything worked fine so I wonder what happened during this build.

Comment 3 Juraci Paixão Kröhling 2014-04-01 16:03:46 UTC
I've tested with building on top of EAP 6.1.1.GA and with the DR6, and it seems that the problem indeed is on DR6, as the sample works with GateIn built on top of 6.1.1.GA. I'll contact the Weld responsible for EAP, to check if they are aware of this issue (as I couldn't find a relevant BZ for it).

Comment 4 Juraci Paixão Kröhling 2014-04-02 09:29:59 UTC
After talking with jharting, I've run a git bisect to see when was this change introduced. I've also run a couple of experiments, to see how it affects EAP. Basically, building on top of EAP 6.1.1.GA doesn't causes this problem, but on top of EAP 6.2.0 does, as well as EAP 6.3.0.DRx. And this is the result of the bisect:

a7582f78503ee563535d21d1d07a1e77e3834f71 is the first bad commit
commit a7582f78503ee563535d21d1d07a1e77e3834f71
Author: Marko Luksa <marko.luksa>
Date:   Tue Jun 11 16:45:08 2013 +0200

    WELD-1415 Cross-context forward/include call from another web app breaks HttpRequestContext cleanup
    (cherry picked from commit a4b40c0)

:040000 040000 dd4aafd316f09dc12a6dfbf58e9cdf94e9f7d882 152572488c7eecb645e406fdd4a6d88b71de43a2 M	impl
:040000 040000 06ac5b7e05b9afc1a0ca7ecbe3ef9c8278174e65 b55f41f469bd1406917429ffffa794d0aab79e09 M	tests-arquillian

Comment 5 Juraci Paixão Kröhling 2014-04-02 10:27:55 UTC
As per jharting, the workaround is to add a context parameter called "org.jboss.weld.context.ignore.include", set to false. I've confirmed that the sample works after adding this. 

    <context-param>
        <param-name>org.jboss.weld.context.ignore.include</param-name>
        <param-value>false</param-value>
    </context-param>

Comment 6 Juraci Paixão Kröhling 2014-04-02 10:29:09 UTC
By the way, this option is available in Weld 1.1.18.Final, which is one version ahead of the one being used in DR6. So, manually patching EAP/Portal with this weld-core version is required.

Comment 7 Petr Mensik 2014-04-02 12:42:27 UTC
I confirm that CDI portlets really works if you patch JPP with Weld 1.1.18.Final and add the context-param (tested on cdi-jsf-portlet from quickstarts).

Comment 8 Jozef Hartinger 2014-04-14 14:18:54 UTC
Please provide a reproducer.

Comment 9 Petr Mensik 2014-05-12 09:09:19 UTC
I have already provided a reproducer to Jozef via email.

Comment 10 Petr Mensik 2014-05-13 12:56:21 UTC
I confirm that this issue has been fixed in ER02.


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