I’m going to start a post that I will update regular when I get strange errors that can be hard to find the solution for. Feel free to post a comment or use the contact form to send me your strange errors and a solution or how to debug the problem.
One of the best tools for debugging is to use the Log File reader found on OpenNTF, another good tool also on OpenNTF is the Debug toolbar
But now to the problems and the possible solutions.
Error while executing JavaScript action expression
Script interpreter error Interpret exceptionjavax.faces.FacesException: Error while executing JavaScript action expressionMy script worked fine the first time I clicked on a button on the form. but the second time the same code ran I got this error Interpret exception, the problem was that I had an undeclared SSJS variable that caused the problem. Putting a var before the variable fixed the problem
Argument for ‘importPackage’ must be a package
You are using an SSJS package and is calling a java library and have written the name within quotes.
i.e importPackage(“com.xpagedeveloper”) but you should write importPackage(com.xpagedeveloper)
Events like onclick and partial refreshed is not working at all
Check if you have loaded any external javascript libraries like JQuery or Select2 the problem is probably AMD loaders that is in collision with Dojo. There is two different solutions I know of,
- Add some Pre or a post code that disable the AMD Loader, check out this great XSnippet @ OpentNTF
https://openntf.org/XSnippets.nsf/snippet.xsp?id=hack-to-use-jquery-amd-widgets-and-dojo-together - Or you can go into the Javascript library and remove the amd loader
https://xomino.com/2015/06/02/select2-v4-needs-amd-fixing-in-domino-r9-xpages/
Clicks gone wild on your XPage
This is a problem I wrote about many years ago and it can be found here
onClick event is trigged where ever I click
This are the first three weird XPage errors but I will continue to add entries here that can help you and me because I can’t count the number of times I’m looking for a problem and I find my own blog with a solution 😉 Also check out my learning XPages page with lots of links
XPage crash with an strange null pointer error
I have done a writeup of the error in a separate post
NullPointerException: Argument error: One or more parameters are null
Awesome information! Thanks for posting this!!
Thanks, no strange problem you like to share David?