When the default error handler is invoked, e.g due to missing jsp, one ends up with an ugly error message as below instead of the actual cause.
An error has occurred!
The following error happened somewhere on this page:
org.openmrs.api.APIException: A user context must first be passed to setUserContext()...use Context.openSession() (and closeSession() to prevent memory leaks!) before using the API
(The full error stack trace output is in the source of this page.)
Here is an example of a link you can try out to reproduce the error http://int01.openmrs.org:8080/openmrs/admin/indexb.htm