You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Thibaut Fagart (JIRA)" <de...@myfaces.apache.org> on 2008/11/24 16:14:44 UTC
[jira] Commented: (PORTLETBRIDGE-48) IllegalStateException in
Websphere Portal.
[ https://issues.apache.org/jira/browse/PORTLETBRIDGE-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650223#action_12650223 ]
Thibaut Fagart commented on PORTLETBRIDGE-48:
---------------------------------------------
seems this is not specific to faces, but rather that the Portal container is accessing the request before the portlet has any chance to do so.
I have the exact same problem with a simple (non JSF) portlet,
doing
public void processAction(ActionRequest request, ActionResponse response)throws java.io.IOException {
System.err.println("processAction : current encoding"+ request.getCharacterEncoding());
System.err.println("processAction : setting encoding to ISO-8859-1");
try {
request.setCharacterEncoding("ISO-8859-1");
System.err.println("processAction : current encoding"+ request.getCharacterEncoding());
// whatever
} catch (RuntimeException e) {
e.printStackTrace();
throw e;
}
}
ends in the catch with the follwing exception
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R processAction : current encodingUTF-8
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R processAction : setting encoding to ISO-8859-1
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R java.lang.IllegalStateException: This method must not be called after the HTTP-Body was accessed !
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at org.apache.pluto.core.impl.PortletRequestImpl.setCharacterEncoding(PortletRequestImpl.java:930)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at org.apache.pluto.portlet.ActionRequestWrapper.setCharacterEncoding(ActionRequestWrapper.java:89)[24/11/08 15:52:28:802 CET] 7cb519d8 SystemOut O actionIDs.size() = 0
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at hsbc.adroot.myportlet51.Myportlet51Portlet.processAction(Myportlet51Portlet.java:56)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.processAction(PortletFilterChainImpl.java:104)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at com.ibm.wps.propertybroker.standard.filter.PropertyBrokerActionFilter.processAction(PropertyBrokerActionFilter.java:261)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.processAction(PortletFilterChainImpl.java:95)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:148)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doPost(PortletServlet.java:76)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at com.ibm.wps.pe.pc.std.cache.CacheablePortlet.service(CacheablePortlet.java:257)
[24/11/08 15:52:28:802 CET] 7cb519d8 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> IllegalStateException in Websphere Portal.
> ------------------------------------------
>
> Key: PORTLETBRIDGE-48
> URL: https://issues.apache.org/jira/browse/PORTLETBRIDGE-48
> Project: MyFaces Portlet Bridge
> Issue Type: Bug
> Components: Impl
> Affects Versions: 1.0.0
> Environment: IBM Websphere Portal 6.1
> Reporter: Felix Röthenbacher
> Attachments: PortletExternalContextImpl.java.diff
>
>
> The bridge tries to set the character encoding in the action phase. In Websphere Portal this results in an IllegalStateException as the HTTP body seems to be accessed already by the portal server.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.