Bug 577109 - ajax / partial-page requests do not properly recover from view exceptions
Summary: ajax / partial-page requests do not properly recover from view exceptions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 1.4
Hardware: All
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Joseph Marques
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-26 07:10 UTC by Joseph Marques
Modified: 2010-08-12 16:57 UTC (History)
1 user (show)

Fixed In Version: 2.4
Clone Of:
Environment:
Last Closed: 2010-08-12 16:57:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Joseph Marques 2010-03-26 07:10:12 UTC
Description of problem:

Partial-page requests made by A4J do not properly redirect to the last known valid URL.  Instead, it will blow up with a stack trace in the server log and an empty page in the browser.

How reproducible:

Very

Steps to Reproduce:
1. Visit the JSF-based inventory browser, which uses partial-page requests to refresh the counts in the tabs / subtabs
2. Bounce the server
3. When the server comes back up, the partial-page request will be initiated, but since the view is expired it will redirect to the login page
  
Actual results:

So you log in, which invokes the failure outlined in the description above.

Expected results:

Successfully reload the inventory browser.

Additional info:

The failure outline in the description happens on any and all pages that use ajax / partial-page requests.  So, this problem can be verified on any of those pages by using the server-bounce method.  Once the fix is committed, all of those pages should now work properly.

Comment 1 Joseph Marques 2010-03-26 07:19:04 UTC
committed to master d0d27d83e1e961d591b674e7c4a80e6adf2981e8

* fix for  partial-page requests not properly recovering from view exceptions
* during the authentication action, test whether we've "bookmarked" an ajax request...if so, redirect to the URLs in the web user preferences previously stored by WebUserTrackingFilter

Comment 2 John Sanda 2010-03-26 12:53:06 UTC
Here is the commit hash for how I handled a similar situation in the raw-config branch - 1fc31c7103c1e5ec432393354e154f377c62cb07 (http://git.fedorahosted.org/git/rhq.git/?p=rhq/rhq.git;a=commit;h=1fc31c7103c1e5ec432393354e154f377c62cb07)

When a ViewExpiredException is thrown, usually due to session timeout, on an ajax request, the redirect url was getting all mangled as due to the inclusion of JSF and RichFaces parameters; consequently, the redirect fails and the user sees a blank page.

I utilized some of the RichFaces support for handling session timeouts. I registered a callback function that displays an alert to the user that their session has timed out and then redirects them to the login page. I was not sure how to get the user back to the previously redirected url. I don't think this work ever got merged into master. It might be worth a look though.

Comment 3 Charles Crouch 2010-05-26 01:22:12 UTC
Pushing to ON_QA, from the comments this looks like its fixed.

Comment 4 Joseph Marques 2010-05-26 02:09:44 UTC
correct, this is fixed, just forgot to push it to QA.

Comment 5 Corey Welton 2010-05-27 20:49:21 UTC
QA Verified.

Comment 6 Corey Welton 2010-08-12 16:57:07 UTC
Mass-closure of verified bugs against JON.


Note You need to log in before you can comment on or make changes to this bug.