On an xpage I run the following code:
function setPersonInfoCommon(x) {
//print("test printing to console value: " + x)
var serv = getPreferenceField("tx_server");
//e.g. "Development1";
var dbname = getPreferenceField("tx_loc_personal_common");
//e.g. "CustomerX\\Personnel.nsf"
var db:NotesDatabase = session.getDatabase(serv,dbname);
if (db == null) {
requestScope.status = "Database not found.";
return;
}
var vw:NotesView = db.getView("LookUpUsersUNID");
if (vw == null) {
requestScope.status = "View not found.";
return;
}
var doc:NotesDocument = vw.getDocumentByKey(x);
if (doc == null) {
requestScope.status = "Document not found.";
return;
}
else{
requestScope.status = "Document created:" + getCreated();
}
}
This freezes my XPage and in the log I see the following notation: 2014-08-19 12:46:11 HTTP JVM: com.ibm.xsp.webapp.FacesServlet$ExtendedServletException: com.ibm.xsp.FacesExceptionEx: java.io.NotSerializableException: lotus.domino.local.DateTime 2014-08-19 12:46:11 HTTP JVM: CLFAD0134E: Exception processing XPage request. For more detailed information, please consult error-log-0.xml located in E:/Domino/data/domino/workspace/logs
The XPage resides in a different NSF than the one I perform the getDocumentByKey method in. However I do not get any indication that the database (db) or view (vw) can not be found. If I check it by outputting the filepath or something I get the correct values returned.
I tested to run the code from within the NSF I perform the getDocumentByKey method and then the code runs just fine.
What can be the cause?
I am logged in via the web and have the proper rights.