[richfaces-issues] [JBoss JIRA] Commented: (RF-4415) Application does not work in Weblogic 10gR3

Ludovic SMADJA (JIRA) jira-events at lists.jboss.org
Wed Feb 3 10:06:26 EST 2010


    [ https://jira.jboss.org/jira/browse/RF-4415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12510118#action_12510118 ] 

Ludovic SMADJA commented on RF-4415:
------------------------------------

In fact the problem exists with some dynamic fragment loading inside the application.

I've found a work-around that I will described now :

After some debugging it assumes that weblogic choose outputstream/writer depending on some consideration about encoding for example.

In my case, the main page was using an outputstream but in my fragment, weblogic use an writer. Here's the conflict because the ajax4jsf is the same between main page and dynamic fragment.

I've developed a work-around with a filter that I put between JSF servlet and AJAX4JSF filter.

The content of this filter is to modify the response object and deliver a writer wrapper to an outputstream. With this, the ajax4jsf filter is always called as outputstream.

The limitation of this solution is that encoding is fixed (but in my application, it's always the case).

this work-around is working on my environment.



> Application does not work in Weblogic 10gR3
> -------------------------------------------
>
>                 Key: RF-4415
>                 URL: https://jira.jboss.org/jira/browse/RF-4415
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: core, third-party
>    Affects Versions: 3.2.1, 3.2.2
>         Environment: Windows XP SP3, Oracle Weblogic 10g R3, JSF 1.2, Richfaces 3.2.1 and 3.2.2 and probably older version.
>            Reporter: Cesar Perez
>            Assignee: Nick Belaevski
>         Attachments: RichfacesErrorProject.zip, web.xml
>
>
> If I use RichFaces 3.2.1 and even 3.2.2CR3 with JSP as my view handler I cannot open a JSP page, even if it doesn't contains any RF tags. This happens on Weblogic 10 and the latest 10g R3. In Tomcat the code works just fine without any issues.
> I created an example eclipse project that shows this issue under Weblogic 10g R3. It contains a configuration to use either JSP or Facelets for the view. If you open the .xhtml file the page will be displayed just fine but if you try to open the JSP an exception is thrown.
> In Weblogic I created a new domain with all the default options and I am deploying the application through Eclipse but I have also tried deploying a WAR/EAR getting the same exception when I try to access the JSP. Also you can remove all the facelets configuration and just leave JSP to handle the view, the exception will be thrown too.
> The only possible fix I have found is to use facelets instead of JSP but in the project I am working on that's just not possible.
> The example project is attached.
> The stacktrace is:
> java.lang.IllegalStateException: Servlet response already use stream, Writer not possible
> 	at org.ajax4jsf.webapp.FilterServletResponseWrapper.getWriter(FilterServletResponseWrapper.java:226)
> 	at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:186)
> 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:547)
> 	at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
> 	at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
> 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:547)
> 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:547)
> 	at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
> 	at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
> 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
> 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
> 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
> 	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
> 	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
> 	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
> 	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
> 	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
> 	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
> 	at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
> 	at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
> 	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
> 	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
> 	at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:503)
> 	at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:251)
> 	at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)
> 	at jsp_servlet.__index._jspService(__index.java:72)
> 	at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
> 	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
> 	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
> 	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
> 	at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
> 	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
> 	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
> 	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
> 	at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
> 	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
> 	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
> 	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
> 	at weblogic.security.service.SecurityManager.runAs(Unknown Source)
> 	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
> 	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
> 	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
> 	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
> 	at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list