Today I got this fairly unknown error when trying to access a document with a XPage.
The runtime has encountered an unexpected error.
Error source
Page Name:/myXpage.xsp
Exception
java.lang.StringIndexOutOfBoundsException
java.lang.String.substring(String.java:1092)
com.ibm.xsp.model.domino.wrapped.DominoRichTextItem.insertNotesClientLinks852(DominoRichTextItem.java:387)
After doing a quick search on google I found a post on the IBM forums claiming this had to do with bad HTML markup within a Rich Text field.
Unfortunately this particular Document had tons of HTML, so it took some time narrowing it down. After some 30 mins I discovered the error was caused by a anchor tag where the href attribute was missing a " at the start...
Anyways.. problem solved!
March 10, 2011
Subscribe to:
Post Comments (Atom)
There is a Java Class HTMLCleaner you could entertain to cleanup the HTML. Could work in a custom validator.
ReplyDeleteThank you Stephan. Will certainly try that!
ReplyDelete