HTTP JVM: com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript action expression
We are using beans and expression language on our XPage and we get the above error from time to time, can anyone tell us if there is an easy way to find out which page is causing this and more importantly where in code? We are having to use trial and error methods and having to resort to remove code from page in order to find out where the problem is, which is not the most efficient way to do this.
Please check the XPages log files in the IBM_Technical_Support folder in the data directory in order to get more details on the error such as what xpage gave the error and specific details on the error.
If you can not get to the XPages log files on the server directly, then use XPages Log File Reader from OpenNTF to get easy access to the log files from a browser.
Like Fredrik Norling I will also recommend the XPages OpenLog Logger by Paul Withers as a solution to generating error log files automatically.
I would implement Paul Withers XPages Openlog implementation with the phase listening bean and error page.
That will help you find the problem. And if you deploy it as an osgi then you only have to set the error page, some xsp properties and add the bean to the faces config file on each database to point it to a central openlog error database.
http://www.openntf.org/Internal/home.nsf/project.xsp?action=openDocument&name=XPages%20OpenLog%20Logger
http://www.openntf.org/Internal/home.nsf/project.xsp?action=openDocument&name=OpenLog
Related
Apologies Paul, this is a duplicate to the post I put on OpenNTF, however the site will not allow me to log in the last 2 days to follow up, plus the wider audience of Stack might find me someone with an identical issue.
To keep it short.
I have 1 openLog database in a folder structure, logs/xpageslog.nsf
During development, I could log to this database, for example, using Paul Withers XPages OpenLog Logger, to log uncaught exceptions with the following settings:
private String logDbName = "logs\\xpageslog.nsf"; // in OpenLogItem.java from OpenLogClass library
logDbName = "logs/xpages.nsf" // in OpenLogFunctions.ls
xsp.openlog.filepath=log/xpageslog.nsf // in xsp.properties
However, if I then change all the above, to simply go to xpageslog.nsf, in the root of the server (this is a 2nd openLog database) errors still get logged to the first database.
I've tried building, cleaning, re-compiling, all to no avail. It seem's to be that somewhere, or somehow, the references to the original database are not being overwritten.
Any ideas?
It is good practice to use restart task http instead of tell http restart. Both commands have different effects.
As confirmed in comments, this solved the problem.
Some use tell http quit followed by load http, the effect is the same as with restart task http. At the other hand, simple tell http restart does not fully initialize http task, it's kind of soft reset and I recommend not using it.
I think this topic a lot of ppl post it already. I also look for lot of thread in stack overflow and some ibm page. They do give some comment of how to solve this problem. But i still facing the same problem, it still give this error.
Case start :
Actually one of my customer, they have facing this error during running on webpages and also notes ~
error 500 http web server: command not handled exception
Action taken but not solve:
The user id signing/creating the XPages allowed to run XPages in the
server document?
Do project clean, build automatically on designer
Do testing on creating new xpages page with simple lable " hello world" , this one can run successfully only.
Try to reload the http server by
tell http quit
load http
After do this the problem still same give the same error. May i know got any other way to solve it?
"Unresolved compilation errors: java.lang.String" points to a failed install as here. A class in java.lang or java.util should always be resolved. Ensure all services and any processes for Notes / Domino are stopped before the relevant install, jar files can get locked once used. Xpages can't load, Error 500; java.util cannot be resolved
Switch on "Display XPage runtime error page" in application's XSP Properties then you'll see a detailed error message which probably will lead you to the issue:
I frequently get this error when there is a mismatch/problem with access rights or the user login has expired and the app/database doesn't redirect to the login page. I suggest you double check the security basics first. (Might also explain why the app works locally, but not on the server).
We have an issue where no XPages work on our server any longer. I am not aware of any server changes; however, I am sure something had to have been done. I have no clue where to look. We cannot get any XPages to work through any browser - tested with IE, Firefox, and Chrome. We just get "Error 500: Command Not Handled Exception". I just created a blank db and added an XPage with "Hello World" and built the project. This error appears when I try to access that xpage through the browser.
04/28/2015 09:07:34 AM HTTP JVM: CLFAD0211E: Exception thrown. For more detailed information, please consult error-log-0.xml located in D:/Lotus/Domino/data/domino/workspace/logs
04/28/2015 09:07:34 AM HTTP JVM: CLFAD0246E: Exception occurred servicing request for: /test.nsf/testXpage.xsp - HTTP Code: 500. For more detailed information, please consult error-log-0.xml located in D:/Lotus/Domino/data/domino/workspace/logs
04/28/2015 09:07:34 AM HTTP Web Server: Command Not Handled Exception [/test.nsf/testXpage.xsp]
error-log-0.xml shows those same errors:
CLFAD0211E: Exception thrown
CLFAD0246E: Exception occurred servicing request for: /dev/samplepagersavestate.nsf/AllCars.xsp - HTTP Code: 500
Any help would be appreciated!
Server version: Windows 2012, 64 bit, Domino 9.0.1 FP2, HF590
Check the IBM_Technical_Support folder as Ferry suggested or install the XPages Log File Reader from OpenNTF also check if some other things has been done to the server recently. New version of extension library, Fixpack install.
Another thing is that I had a Windows 2012 installed server where I needed to apply 9.0.1 FP3 to before I got the xpage engine to run at all.
The resolution was discovered! We had added some Crystal Reports jar files to the C:\Lotus\Domino\jvm\lib\ext directory. It appears as if Domino and XPages did not like that. Instead, we had to put them in a directory external to Domino and then needed to reference those jar files in the "JavaUserClassesExt" line of the notes.ini.
After this was completed, Xpages worked!
Is the user id signing/creating the XPage allowed to run XPages in the server document? It is the Sign agents or XPages to run on behalf of the invoker.
Howard
plugins installed via update site uploaded by a person who is no longer in NAB?
I have an Xpages framework DB that I use to copy from and paste into other dbs.
I just did this and got a very bizarre error. Even if I create a brand new EMPTY Xpage in the database, I get the "Xpages 404 The requested resource cannot be located error" when previewing the Xpage in the client or the web.
I checked the logs and found this entry
7/2/14 11:22 AM: Exception Thrown
com.ibm.designer.runtime.domino.adapter.util.PageNotFoundException: Could not create the page /T.xsp because the class xsp.T could not be found. Please check your spelling.
at com.ibm.domino.xsp.module.nsf.NSFService.doService(Unknown Source)
What?
I have cleaned the db, changed the name of the Xpages, etc. All to no avail.
What is going on?
Is it an NSF or an NTF? NTFs cannot be previewed on the web - that's standard for Domino HTTP.
Are you certain the two errors are linked? As far as I know, a 404 error is an HTTP error, from the Domino HTTP task. That's triggered either immediately before or immediately after authentication is checked, and before the XPages runtime kicks in. It's not an XPages error. When an XPages error is logged, it generates an HTTP 500 error.
The other cause I've seen for a 404 error on a new XPage is if there were problems building the project. Then the error shows in Domino Designer for the XPage or a Custom Control on that XPage. But that's an XPage error on building the project in Domino Designer, which means the XPage resource is not available in the NSF for HTTP. (Think of it like saving a new LotusScript Script Library with errors, which it will let you do, then trying to call it from an agent.) It won't log an XPages error to the server console or XPages logs - HTTP won't find the XPage because its classes haven't been built, so it returns an HTTP error and doesn't start the XPages Command Manager.
I get the following errors in my server log.
2012-03-06 09:20:43 HTTP JVM: CLFAD0211E: Exception thrown. For more detailed information, please consult error-log-0.xml located in D:/Lotus/Domino/data/domino/workspace/logs
2012-03-06 09:20:43 HTTP JVM: CLFAD0229E: Security exception occurred servicing request for: /demo.nsf/home.xsp - HTTP Code: 500. For more detailed information, please consult error-log-0.xml located in D:/Lotus/Domino/data/domino/workspace/logs
The user only sees this in the webbrowser (source)
<html>
<head>
<title>Error</title></head>
<body text="#000000">
<h1>Error 500</h1>HTTP Web Server: Command Not Handled Exception</body>
</html>
So I can tell by the server log that there is a security exception thrown at the server, probably because I have wrong settings in my java.policy file. but my issue is not what is causing the error, but rather how can I avoid users getting these ugly 500 errors.
I would like the error page I have set in the application to be presented to the user just like any other exception.
possible?
The more try/catch blocks you have in your code, the better (within reason, of course):
try {
// code that might throw an error
} catch (e) {
// examine the error to see if there's a workaround
// if not, log it and inform the user
} finally {
// any code that needs to run whether or not there was an error
}
This way if something fails, it fails gracefully. Just be sure to make it obvious to the user that something went wrong (and, preferably, provide them instructions they can actually follow up on)... failing silently is even worse than an ugly error page if something went wrong and the user thinks everything was fine.
P.S. As Stephan indicates, there are some errors that simply can't be caught. If the XPage wasn't signed by someone with access to run XPages, for instance, it never even gets to the point of trying to run your code... the page itself is invalid, so there's nothing you can do at runtime. Always make sure that your XPages are signed during deployment.
There are a number of errors that "break through" even if you have an error page defined. E.g. when you drag a control onto itself. Security seems another area. All of them are stuff you should handle in development. I haven't seen errors that "typically" happen (true runtime after development completed and tested type of errors) escaping a custom error page. Other than that follow Declan's advice.
I had an issue like this also where my error page was not being displayed and the error 500 page would display instead.
What I discovered is that there was a problem in my error page also and the renderer therefore can't display the error for the original page and you get the server default error page instead.
The best way to check if this is the cause of your particular issue is to start with a simple error page, no theme, no ssjs libraries, no ssjs code on the page etc, just a blank xpage with some static text to indicate that it is the error page.
Once you can confirm that this is the possible cause of the error 500 then you can start building up that error page and add in the dynamic stuff bit by bit till it is the way you need it.
Dmytro Pastovenskyi has a good article http://dpastov.blogspot.com/2012/01/error-pages-in-domino.html about error pages in Domino.
To be on the safe side I have a static html page saying "An error occured". This page is referenced by the HTTPMultiErrorPage setting in the notes.ini on your server.
Then there is a "HTTP response headers" rule addressing special error codes.
The main problem still is, that these are global settings. So there is no easy way to catch all errors specially for your application. But a least the user don't get this annoying white error page.
I have had similar issues with this. Error messages bubbling up from some underlying fault that overrides the defined error page for the application. This is not a nice behavior (from a user perspective) and makes you feel a bit naked. I do understand that it's hard for the application to trap those - but there should at least be a way to customize that message - The default error 500 page is not very useful for a normal user anyway...
The only(?) way to try to avoid that your code throws such error (ssjs/java) is to (as Tim Tripcony already mentioned) always use try/catch statements around the code (as you already know :))
getDocumentByUNID() is a "good" example of a method that will cause the ugly (but standard) error 500 page to be displayed instead of the defined one in the app.
As for any other error types (system/security and such) - I don't think it's possible to redirect those to the (by the user) invoked applications error page because they are not invoked from the application but rather before the application is invoked (I hope I'm wrong).
Make a new XPage called error.xsp (for example). Put there some basic info that something went wrong, apologize for that fact and provide few links how to continue with the work (even though his/her data may be lost forever - history.go(-1) usually does not resolve the problem). In the background you can log the error (usage of OpenLog recommended).
Open Application Properties, XPages tab. Uncheck Display XPages runtime error page. In the combo Error page select your page (error).