asummers
asummers

Reputation: 177

How to identify XPages errors at the console

I have an XPages application that has been running in production for a few years now and has been built on continually to add new functionality. In the last few months I have noticed errors like these below on the server console. The console advises to check the error-log-0.xml file, but what is reported there doesn't really lead me to any useful conclusions as to what is causing the problem.

2014-11-27T07:27:12.156+00:00 SEVERE CLFAD0131E: Unable to push data because: Unable to open database: com.ibm.xsp.binding.javascript.JavaScriptValueBinding@539c539c
2014-11-27T07:27:12.156+00:00 SEVERE CLFAD0134E: Exception processing XPage request 
2014-11-27T07:27:12.359+00:00 SEVERE CLFAD0131E: Unable to push data because: Error while executing JavaScript computed expression
2014-11-27T07:27:12.359+00:00 SEVERE com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression com.sun.faces.lifecycle.ApplyRequestValuesPhase 
2014-11-27T07:27:12.375+00:00 SEVERE CLFAD0134E: Exception processing XPage request 
2014-11-27T07:27:16.468+00:00 SEVERE CLFAD0131E: Unable to push data because: Unable to open database: com.ibm.xsp.binding.javascript.JavaScriptValueBinding@539c539c 
2014-11-27T07:27:16.468+00:00 SEVERE Unable to open database: com.ibm.xsp.binding.javascript.JavaScriptValueBinding@539c539c com.sun.faces.lifecycle.ApplyRequestValuesPhase 
2014-11-27T07:27:16.468+00:00 SEVERE CLFAD0134E: Exception processing XPage request 

The application in question has a number of additional databases linked to it, for instance we're using a flash upload control for multiple file uploads and they are stored in a separate db. Therefore the filedownload control is actually listing the attachments in number of documents in a different database to the main document. Similarly, there is another database for storing multiple "reference" documents associated with the main document, so on another page I have a repeat control listing the values on these reference documents in a nice table, but the data is coming from a different db.

The first thing I did was make sure that the ACL is the same on all the databases that are linked to the main app, thereby ruling out an access issue. The application itself is on a server that uses Active Directory to authenticate users (via the Kerberos value on person docs in the NAB) rather than their username and password.

So my question is, how do I identify what is causing these errors? The valuebiniding is failing somewhere but I don't how to translate JavaScriptValueBinding@539c539c in to an actual control on a page. The application itself is very complex these days with a lot of code in it and links to the databases all over the code. I can't reproduce this problem and I don't know what effect this has on a user's session when the server logs it, but identifying the control that triggers the error will at least allow me to add better error handling. We use Try Catch everywhere in the system so I am surprised this happens at all.

Any ideas how to identify the offending code block ?

Upvotes: 0

Views: 765

Answers (1)

Paul Stephen Withers
Paul Stephen Withers

Reputation: 15729

If you have a custom error page, XPages OpenLog Logger on OpenNTF will catch all uncaught exceptions and log out the component and details of where the error is occurring. It's significantly speeded up my development and was one of the key pieces of functionality I wanted to be able to offer in the project. Note in the screenshot below of the error passed to Open Log all the SSJS code is displayed, but it has no try/catch block.

enter image description here

The link to XPages OpenLog Logger is http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=XPages%20OpenLog%20Logger

Upvotes: 2

Related Questions