Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax Error Handler ViewExpiredException #116

Closed
vikasgithub opened this issue Jun 3, 2013 · 13 comments
Closed

Ajax Error Handler ViewExpiredException #116

vikasgithub opened this issue Jun 3, 2013 · 13 comments
Assignees
Milestone

Comments

@vikasgithub
Copy link

I am getting problem while handling ViewExpiredException using ajax error handler. The error comes only when I used extended mode of the ajax error handler factory, that is, I declare, AjaxExceptionHandlerFactory in the faces-config.xml. However, in normal mode, things works fine, but I lose the extended mode features.

I get the following error

java.lang.IllegalStateException: STREAM
at org.eclipse.jetty.server.Response.getWriter(Response.java:683)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:152)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:152)
at org.apache.myfaces.shared.view.HttpServletResponseSwitch.getWriter(HttpServletResponseSwitch.java:148)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.getResponseOutputWriter(ServletExternalContextImpl.java:185)
at org.apache.myfaces.context.servlet.PartialViewContextImpl.getPartialResponseWriter(PartialViewContextImpl.java:361)
at org.primefaces.context.PrimePartialViewContext.getPartialResponseWriter(PrimePartialViewContext.java:45)......

A bit of debugging revealed that Outputstate is set as STREAM, that's why this error is coming.

I am using primefaces extensions version 0.7, Jetty 8, Myfaces 2.1.10.

I am using Myfaces version 2.1.10 and session is being removed by session timeout. Here are my configuration files and error logs

  1. web.xml : https://gist.github.com/anonymous/5610721
  2. pom.xml : https://gist.github.com/anonymous/5610730
  3. faces-config.xml: https://gist.github.com/anonymous/5610727

and here is the link to complete error log, https://gist.github.com/anonymous/5610765

@ghost ghost assigned slany Jun 4, 2013
@ova2
Copy link
Member

ova2 commented Jun 4, 2013

Assigned to Pavol. Please set a Milestone when you fix this issue.

@slany
Copy link

slany commented Jun 17, 2013

Dear vikasgithub, please, contact me on pavol.slany(at)gmail(dot)com. I need start deeper communication about this problem. Thank you.

@ova2
Copy link
Member

ova2 commented Sep 13, 2013

What is the state of this issue? We will release 1.0.0 RC1 on Monday (16. September).

@slany
Copy link

slany commented Sep 17, 2013

I close this issue, because:

  • I cannot reproduce this problem
  • cooperation with vikasgithub is broken now.
    I think, this is not problem yet.

@slany slany closed this as completed Sep 17, 2013
@slany
Copy link

slany commented Oct 11, 2013

This issue is reopenned, because we have other information:
http://forum.primefaces.org/viewtopic.php?f=14&t=30445&p=109717#p109717

@slany slany reopened this Oct 11, 2013
@tandraschko
Copy link
Member

AFAIC the issue is the calculation of the viewID, right?
I've written a utils method some months/years ago:

    public static String calculateViewId(final FacesContext context)
    {
            final Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
            String viewId = (String) requestMap.get("javax.servlet.include.path_info");

            if (viewId == null)
            {
                    viewId = context.getExternalContext().getRequestPathInfo();
            }

            if (viewId == null)
            {
                    viewId = (String) requestMap.get("javax.servlet.include.servlet_path");
            }

            if (viewId == null)
            {
                    viewId = context.getExternalContext().getRequestServletPath();
            }

            return viewId;
    }

Maybe you can give it a try.

@slany
Copy link

slany commented Oct 11, 2013

I have plane check it. Thank you for help :)

@vikasgithub
Copy link
Author

Yes. you are right. I have checked it. It works.

Thanks,
Vikas

On Fri, Oct 11, 2013 at 3:14 PM, Pavol Slany notifications@github.comwrote:

I have plane check it. Thank you for help :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/116#issuecomment-26125727
.

@ova2
Copy link
Member

ova2 commented Nov 5, 2013

What is the state of this issue? Is it fixed or not? I will postpone it to the 1.2.0.

@ova2
Copy link
Member

ova2 commented Nov 5, 2013

No problem Pavol. In 2-3 days I will do a release 1.1.0, so you have time to resolve this issue until the next release. It will go to the next 1.2.0 release then. Thanks.

@slany
Copy link

slany commented Nov 11, 2013

This bug was resolved. This commit is after release 1.1.0. Thank you very much to vikasgithub for helping with this hidden bug.

@slany slany closed this as completed Nov 11, 2013
@ova2
Copy link
Member

ova2 commented Nov 12, 2013

Cool. Thanks Pavol. I heard, AjaxErrorHandler is used by many companies.

@slany
Copy link

slany commented Nov 12, 2013

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants