This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Aug 11, 2011, 8:40 PM
19 Posts

Keep Getting Error 500 Command Not Handled Exception

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.3
  • Role:
  • Tags:
  • Replies: 2
Hi All,
 
I'm very new to XPages and stuck with an error I can't get past.  I have a custom control that has a repeat  container.  I have several computed fields displaying data from the repeat container and that works great.  Now I want to take one of those values and go fetch other values from another database to display.  So I added a computed field to the repeat container with the code below.  When the line executes to do the getDocumentByID I get the Error 500.
 
Any thoughts on this????
 
var currentDocument : NotesDocument = repeat1.getDocument();
var path = database.getFilePath().split(database.getFileName())[0]
var dbInfo = new Array(@DbName()[0],path + "otherDatabase.nsf");
aName= currentDocument.getItemValueString( "SomeFieldValue" );

aDocumentID = @DbLookup( dbInfo, "vwSomeView", aName, 5 );

if( aDocumentID )
{
    var locatorDocument : NotesDocument = database.getDocumentByID( aDocumentID[0] );  <<==  THIS LINE CAUSES THE ERROR
    if( locatorDocument )
        locatorDocument.getItemValueString( "PhoneNumber" );
}
else
        "N/A" 
Aug 12, 2011, 2:20 AM
25 Posts
Re: Keep Getting Error 500 Command Not Handled Exception
 Steve,
 
Try this: 
 
var locatorDocument = null; 
if (aDocumentId && typeof aDocumentId == "object") {  
    locatorDocument:NotesDocument = database.getDocumentById(aDocumentID[0]);
} else if (aDocumentId && typeof aDocumentId == "string") { 
    locatorDocument:NotesDocument = database.getDocumentById(aDocumentID); 
if (locatorDocument) {
    locatorDocument.getItemValueString("PhoneNumber"); 
Aug 14, 2011, 7:02 PM
2 Posts
Re: Keep Getting Error 500 Command Not Handled Exception
Tip: It's always helpful to activate the “Display default error page” check box in the application properties.
You'll then get very useful information about errors that occur :)
 
@see http://www-10.lotus.com/ldd/ddwiki.nsf/dx/error-management-in-xpages.htm#Development+flag+for+better+error+messages+with+the+Java+stack

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal