|
Prev: Problem related to default page layout of application
Next: godaddy to authorize.net connection error
From: Max Donnelly on 18 Jun 2008 12:09 I have created a web application which loads the core functionality into application scope as an object. The application.cfc file instantiates the object if it isn't already initialized, and then parses the URL to establish various variables which are utilized to control database queries and layout templates to include. Everything works fine, but when browsing the site, if a page sits for a minute or two on screen (i.e., I go pour a cup of coffee and return to my computer), then a new link selected, or a page refresh called, the application occasionally throws the java.lang.NullPointerException. The details of the error reveal that the following line is creating the error: <cfset basicCopy = application.ciCMS.getBasicCopy(#page#)> Apparently, the variable "page" is somehow expiring, lapsing, disappearing? As I said earlier in this post, within my application.cfc, in the "OnRequestStart" function, I parse the URL to establish a number of variables, including "page". I even set a param for the "page" variable, with a default value, to handle cases where no "page" is passed in the URL. As I said, this only happens if the page has been sitting for a minute or more (I don't have a precise time frame), and then a new link is selected or page refresh called. After the error displays, another refresh loads the application perfectly, and it continues to function fine until it is left alone for a few minutes. I can provide more details, including the full error dump, if anyone wants to see it. My troubleshooting so far: I have introduced cfheader cache-control and expires code to block browser caching, meta tag cache-control, played around with the OnRequestStart function, all to no avail. Thanks in advance! |