0
votes

I have a strange and intermittent error with my Xpages app.

I am extensively using sessionScope variables for various housekeeping items in my app, like navigation and layout titles.

From time to time my app blows up because one of my sessionScope values is null - but it should not be null.

The code blows up on an include page in my main Xpage:

What I am trying to accomplish is dynamically load a page in the facet_1 of an appLayout.

<xp:include id="include1" xp:key="LeftColum">
                <xp:this.pageName><![CDATA[${javascript:var selPage:String = sessionScope.selectedPage;
var pageType:String = sessionScope.pageType[selPage];

if (pageType == "0")
{navKey = "ccAppNav"}

if (pageType == "9")
{var capSelPage = selPage.charAt(0).toUpperCase() + selPage.substring(1);
navKey = "ccAppNav" + capSelPage}

navKey + ".xsp"}]]></xp:this.pageName>
            </xp:include>

It works perfectly for awhile, but then randomly blows up as the value session.selectedPage is null. I am almost certain I am not setting the value to null anywhere in the code.

Oddly, I am also seeing this error near the null error.

"Xpage State data not available for /xpApp because no control tree was found in the cache."

That sounds to me like Xpages has flushed the sessionScope values.

1
HI Bryan, is this issue resolved at your end? what are configuration you are using on the server side and database side? Please let me know. Thank you.Prashant Arkal
Prashant, I assume you are having the same issue. One thing I did was to lengthen my timeout, as Paul suggested below. Eventually I abandoned the SessionScope way to keep my navigation state as it proved to be too problematic.Bryan Schmiedeler
Hi Bryan, thank you for reply. In my case I can't go away with sessionScope variable. Can you please send me the configuration that you are using for timeouts? @ which place these values to be updated?Prashant Arkal

1 Answers

1
votes

Ensure Session Timeout and Application Timeout in xsp.properties is greater than HTTP timeout. Otherwise the user will not be prompted to log in again, but the sessionScopes and applicationScopes could get removed.

Also, the same can happen if someone else refreshes design of the application or cleans the application.