When XPages Don't Work – Why Do I See SSJS?

Home » When XPages Don't Work – Why Do I See SSJS?

There are a number of reasons for errors in XPages. Some will be coding errors that can be diagnosed by enabling the default error page or adding a custom XPages error page. Others are caused by Java class loading errors, which throw an error 500 to the server console and the browser regardless of any error pages. The IBM_TECHNICAL_SUPPORT folder on the server can give you more information to track down the cause, and for this I’d like to give a quick shoutout to Jakob Majkilde’s excellent OpenNTF project XPages Log File Reader.

But at the end of last week I encountered a strange problem that I quickly diagnosed was specific to the environment I was deploying the application. The cause took longer to diagnose. When I previewed XPages I saw Server-Side JavaScript code instead of the fields I expected to see. The Server-Side JavaScript code was for the xp:selectItems element of a Dojo FilteringSelect control from the Extension Library. I tried various design refreshes, cleaning the project, rebuilding, all to no avail. Andyet the symptoms were vaguely familiar.

When I finally looked at the source code for the web page, this was what I saw and I immediately remembered the cause.Source Code

The Dojo Filtering Select was rendered to the browser as it was shown in the source pane, except for the xe prefix.

The cause: after refreshing the design I had rebuilt the application using a Domino Designer that did not have the Extension Library installed. Unfortunately the error did not show up in the Errors panel, only in the Application Properties on the Advanced tab when I viewed that, and only then as a warning.

The lesson: whenever doing anything with an application using a PC that is not your usual PC, ensure you have everything required by the application. That means Java classes, external jar files (in the relevant file location), and any external libraries.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top