Reputation: 3127
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.
Upvotes: 0
Views: 189
Reputation: 15729
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.
Upvotes: 1