-
1. Re: direct access to the webapp, outside of the portlet ?
wesleyhales Oct 10, 2008 11:39 AM (in response to antoine_h)Yes, you should be able to directly access the servlet context also. Does your page.xhtml or backing bean have portlet specific code that needs to check for environment?
-
2. Re: direct access to the webapp, outside of the portlet ?
antoine_h Oct 10, 2008 1:47 PM (in response to antoine_h)I don't think so
the user is not logged and no use of the principal given by the portlet.
the locale is provided by another mean than the portlet
if this is the cause, the stack trace would show it, no ?
the full stacktrace is :19:07:59,906 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception javax.faces.FacesException: No saved portlet window state for an id null at org.jboss.portletbridge.context.ServletExternalContextImpl.<init>(ServletExternalContextImpl.java:96) at org.jboss.portletbridge.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:164) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:239) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595)
(it is twice in the logs)
it looks like the error is at the very begining of the PortletBridge processing, no ?at javax.faces.webapp.FacesServlet.service(FacesServlet.java:239)
and that it is about not finding the window state id.
(I am sure I don't use any thing about the windows of portlets etc...)
more over : the page is there ... the first time
when I click on a link, it uses the same things as for the first request (fake action...)
same things are done... but the error is triggered...
*********
I noticed also something : if I start the server and directly call the JSF app (outside portlet), I get the page (with no portal) ... then click on any link or button... I get this error :19:37:49,421 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception javax.portlet.faces.BridgeUninitializedException: JSF Portlet bridge was not initialised before AJAX request at org.jboss.portletbridge.context.ServletExternalContextImpl.<init>(ServletExternalContextImpl.java:100) at org.jboss.portletbridge.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:164) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:239) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:595)
"JSF Portlet bridge was not initialised before AJAX request"
I guess you have tried the standalone running, with some JSF App ?
What may be in my app, that makes all this ?
any idea to search in my config ?
Thanks, -
3. Re: direct access to the webapp, outside of the portlet ?
antoine_h Oct 10, 2008 2:23 PM (in response to antoine_h)Hello again,
see the post above.
I have tested the "standalone way" with a very simple jsf app.
the same as the button demo in the RichFaces Demo.
(enter a name, click the button, then "hello name" is shown)
same troubles...
no use of portlet api for sure...
what testing did you do to try the "standalone way" ?
what may be wrong in my config ?
I use facelets, RichFaces... in portlets, thats all...
The trouble is with an Ajax component (commandLink or commandButton).
Thanks -
4. Re: direct access to the webapp, outside of the portlet ?
anthonydesvernois Dec 8, 2008 6:11 AM (in response to antoine_h)Up, I got the same errors ... Did you solve it Antoine ?
-
5. Re: direct access to the webapp, outside of the portlet ?
antoine_h Dec 8, 2008 6:27 AM (in response to antoine_h)hello,
no... did not solved it.
I wonder if this is a wrong use of it, or a bug (and then open a jira). -
6. Re: direct access to the webapp, outside of the portlet ?
wesleyhales Dec 8, 2008 1:34 PM (in response to antoine_h)which version of the bridge are you using? environment details please...
-
7. Re: direct access to the webapp, outside of the portlet ?
anthonydesvernois Dec 8, 2008 1:48 PM (in response to antoine_h)I'm using PortletBridge B4, with JBoss AS 4.2.1-GA, JBoss Portal 2.6.6, Seam 2.0.3-CR1 and Richfaces 3.2.2-GA.
-
8. Re: direct access to the webapp, outside of the portlet ?
antoine_h Dec 8, 2008 2:05 PM (in response to antoine_h)I'm using PortletBridge B4, with JBoss AS 4.2.2-GA, JBoss Portal 2.6.4, and Richfaces 3.2.2-GA.
No Seam.
JSF : from JBoss as 4.2.2... the Sun RI. -
9. Re: direct access to the webapp, outside of the portlet ?
alexsmirnov Dec 8, 2008 3:00 PM (in response to antoine_h)Yes, this is an unchecked combination. Only usual form submit works, but ajax request does not. I've created issue in the project tracker: https://jira.jboss.org/jira/browse/PBR-65.
Thank you for this information. -
10. Re: direct access to the webapp, outside of the portlet ?
antoine_h Dec 8, 2008 3:30 PM (in response to antoine_h)thanks for the answer.
if I may help ....
with some testing and reporting after the code modification may be. -
11. Re: direct access to the webapp, outside of the portlet ?
vmolyakov Dec 16, 2008 9:59 AM (in response to antoine_h)I have run richfaces demo application under WebSphere 6.1
It works as a portlet, but when I invoke it as a webaap I get
"Error 500: No saved portlet window state for an id null " error message[12/16/08 16:55:44:301 EET] 0000009d ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: Faces Servlet. Exception thrown : javax.faces.FacesException: No saved portlet window state for an id null at org.jboss.portletbridge.context.ServletExternalContextImpl.<init>(ServletExternalContextImpl.java:96) at org.jboss.portletbridge.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:164) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:260) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498) [12/16/08 16:55:44:445 EET] 0000009d BaseXMLFilter E org.apache.commons.logging.impl.Jdk14Logger error Exception in the filter chain javax.servlet.ServletException: No saved portlet window state for an id null at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:166) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498) ---- Begin backtrace for Nested Throwables javax.faces.FacesException: No saved portlet window state for an id null at org.jboss.portletbridge.context.ServletExternalContextImpl.<init>(ServletExternalContextImpl.java:96) at org.jboss.portletbridge.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:164) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:260) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498) [12/16/08 16:55:44:628 EET] 0000009d WebApp E [Servlet Error]-[Faces Servlet]: javax.faces.FacesException: No saved portlet window state for an id null at org.jboss.portletbridge.context.ServletExternalContextImpl.<init>(ServletExternalContextImpl.java:96) at org.jboss.portletbridge.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:164) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:260) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145) at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177) at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267) at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
-
12. Re: direct access to the webapp, outside of the portlet ?
vmolyakov Dec 16, 2008 10:04 AM (in response to antoine_h)Forget to say that I use v.3.2.2.GA SVN $Revision: 8947 $
RichFaces + bridge v.1.0.0.B4 + JSF SUN RI 1.2.0_9 + Facelets 1.1.4 -
13. Re: direct access to the webapp, outside of the portlet ?
anthonydesvernois Dec 16, 2008 10:41 AM (in response to antoine_h)I have resolved my problem with the JSF Ajax ... exception, by changing
String stateId = servletRequest .getParameter(PortletStateHolder.STATE_ID_PARAMETER); if (null != stateId)
byString stateId = servletRequest .getParameter(PortletStateHolder.STATE_ID_PARAMETER); if (null != stateId && !stateId.equals("null"))
In FacesContextFactoryImpl.java (in the sources of portletbridge)
Maybe it can help you ...
The modified portletbridge implementation is available here:
http://anthony.episphere.fr/portletbridge-impl-1.0.0.B4.jar
Have fun -
14. Re: direct access to the webapp, outside of the portlet ?
wesleyhales Dec 16, 2008 11:32 AM (in response to antoine_h)This is on trunk, thanks for the fix!