[weld-issues] [JBoss JIRA] (WELD-510) Support for Portlet 2.0

Sverker Abrahamsson (Commented) (JIRA) jira-events at lists.jboss.org
Thu Oct 20 16:40:45 EDT 2011


    [ https://issues.jboss.org/browse/WELD-510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636256#comment-12636256 ] 

Sverker Abrahamsson commented on WELD-510:
------------------------------------------

I've done some tests on the combination JBoss AS 7.0.2, Weld 1.1.2.Final, JBoss Portlet Bridge 3.0 Beta1, Liferay trunk (which will be the 6.1 release). I've configured my test package so that I can access it as a web application (which works fine) as well as a portlet. When accessing it as a portlet I get the following stacktrace which seems like the cross-context problem described above (since the stacktraces are very long I only include down to the GenericPortlet):

21:40:09,507 ALLVARLIG [org.jboss.portletbridge.faces] (http--127.0.0.1-8080-3) Error to execute beforePhase RESTORE_VIEW 1 method for listener: java.lang.IllegalStateException: Must call associate() before calling activate()
        at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:277) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:114) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:88) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.portletbridge.lifecycle.LifecyclePhase.execute(LifecyclePhase.java:67) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:81) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.lifecycle.PortletLifecycle.execute(PortletLifecycle.java:143) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.AjaxPortletBridge.execute(AjaxPortletBridge.java:1186) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.AjaxPortletBridge.doFacesRequest(AjaxPortletBridge.java:656) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at javax.portlet.faces.GenericFacesPortlet.doFacesDispatch(GenericFacesPortlet.java:567) [portletbridge-api-3.0.0.lime-SNAPSHOT.jar:]
        at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:475) [portletbridge-api-3.0.0.lime-SNAPSHOT.jar:]
        at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328) [portlet.jar:private-2011/04/13-23:33:42]
        at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:446) [portletbridge-api-3.0.0.lime-SNAPSHOT.jar:]
        at javax.portlet.GenericPortlet.render(GenericPortlet.java:233) [portlet.jar:private-2011/04/13-23:33:42]
--- cut ----

21:40:10,304 ALLVARLIG [javax.enterprise.resource.webcontainer.jsf.application] (http--127.0.0.1-8080-3) Error Rendering View[/index.xhtml]: java.lang.IllegalStateException: A request must be associated with the context in order to load the known conversations
        at org.jboss.weld.context.AbstractConversationContext.getCurrentConversation(AbstractConversationContext.java:416) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at org.jboss.weld.jsf.ConversationAwareViewHandler.getActionURL(ConversationAwareViewHandler.java:110) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]
        at javax.faces.application.ViewHandlerWrapper.getActionURL(ViewHandlerWrapper.java:185) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at org.jboss.portletbridge.application.PortletViewHandler.getActionURL(PortletViewHandler.java:164) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:232) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
        at com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin(FormRenderer.java:135) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
        at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1754) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
        at org.jboss.portletbridge.application.PortletViewHandler.renderView(PortletViewHandler.java:208) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.lifecycle.RenderResponsePhase.executePhase(RenderResponsePhase.java:104) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.lifecycle.LifecyclePhase.execute(LifecyclePhase.java:74) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.lifecycle.PortletLifecycle.render(PortletLifecycle.java:188) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.AjaxPortletBridge.render(AjaxPortletBridge.java:1190) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at org.jboss.portletbridge.AjaxPortletBridge.doFacesRequest(AjaxPortletBridge.java:661) [portletbridge-impl-3.0.0.lime-SNAPSHOT.jar:]
        at javax.portlet.faces.GenericFacesPortlet.doFacesDispatch(GenericFacesPortlet.java:567) [portletbridge-api-3.0.0.lime-SNAPSHOT.jar:]
        at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:475) [portletbridge-api-3.0.0.lime-SNAPSHOT.jar:]
        at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328) [portlet.jar:private-2011/04/13-23:33:42]
        at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:446) [portletbridge-api-3.0.0.lime-SNAPSHOT.jar:]
        at javax.portlet.GenericPortlet.render(GenericPortlet.java:233) [portlet.jar:private-2011/04/13-23:33:42]´
--- cut ----

What is needed to solve the cross-context issue?
                
> Support for Portlet 2.0
> -----------------------
>
>                 Key: WELD-510
>                 URL: https://issues.jboss.org/browse/WELD-510
>             Project: Weld
>          Issue Type: Feature Request
>    Affects Versions: 1.0.1.Final
>            Reporter: Neil Griffin
>            Assignee: Marko Strukelj
>            Priority: Blocker
>             Fix For: 1.2.0.Beta1
>
>
> There are some folks trying to use the PortletFaces Bridge for JSF 2.0 + Portlet 2.0 in Glassfish V3, but Weld is causing an issue.
> Original Post:
> http://www.portletfaces.org/community/forums/-/message_boards/message/43041#_19_message_43038
> Here is a simple stacktrace of the problem:
> Caused by: java.lang.IllegalStateException: Weld doesn not support using JSF in an non-servlet environment
> at org.jboss.weld.jsf.JsfHelper.getModuleBeanManager(JsfHelper.java:119)
> at org.jboss.weld.jsf.WeldPhaseListener.initiateSessionAndConversation(WeldPhaseListener
> The code for the bridge API is here:
> http://svn.portletfaces.org/svn/portletfaces/bridge/org.portletfaces.bridge.api/
> The code for the bridge IMPL is here:
> http://svn.portletfaces.org/svn/portletfaces/bridge/org.portletfaces.bridge.impl/
> And the code for a sample portlet is here:
> http://svn.portletfaces.org/svn/portletfaces/portlets/sample/jsf-2.0-job-application-portlet/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the weld-issues mailing list