Editing A Page Causes IndexOutOfBoundsException

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

A specific user is not able to edit a particular page in Confluence.

The following appears in the atlassian-confluence.log:

2012-09-03 16:43:54,829 ERROR [http-8080-1] [confluence.pages.actions.AbstractEditPageAction] handleVersionConflict Error generating diff for page: page: Test (21595523)
 -- url: /pages/doeditpage.action | page: 16025087 | userName: test | referer: https://<confluence-url>/pages/editpage.action?pageId=16025087 | action: doeditpage
com.atlassian.confluence.diff.DiffException: Index: 72897, Size: 72897
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.createOrGetFutureDiff(DaisyHtmlDiffer.java:152)
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.diff(DaisyHtmlDiffer.java:95)
	at com.atlassian.confluence.diff.WikiConvertingHtmlDiffer.diff(WikiConvertingHtmlDiffer.java:31)
	at com.atlassian.confluence.pages.actions.AbstractEditPageAction.handleVersionConflict(AbstractEditPageAction.java:270)
	at com.atlassian.confluence.pages.actions.AbstractEditPageAction.doEdit(AbstractEditPageAction.java:132)
	at com.atlassian.confluence.pages.actions.EditPageAction.doEdit(EditPageAction.java:209)
.....
Caused by: java.lang.IndexOutOfBoundsException: Index: 72897, Size: 72897
	at java.util.ArrayList.RangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at org.outerj.daisy.diff.html.TextNodeComparator.getTextNode(TextNodeComparator.java:67)
	at org.outerj.daisy.diff.html.TextNodeComparator.handlePossibleChangedPart(TextNodeComparator.java:136)
	at org.outerj.daisy.diff.html.HTMLDiffer.diff(HTMLDiffer.java:81)
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.diff(DaisyHtmlDiffer.java:228)
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.renderContentAndDiff(DaisyHtmlDiffer.java:166)
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.createOrGetFutureDiff(DaisyHtmlDiffer.java:143)
	... 206 more

2012-09-03 15:53:50,032 ERROR [http-8080-1] [mail.notification.listeners.AbstractNotificationsListener] sendNotification Send Notification: Error determining diff for: page: Test (16025087). Diff will be omitted from the notification email.
 -- url: /pages/doeditpage.action | page: 16025087 | userName: test | referer: https://<confluence-url>/pages/editpage.action?pageId=16025087 | action: doeditpage
com.atlassian.confluence.diff.InterruptedDiffException: Diff timed out during daisydiff.
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.diff(DaisyHtmlDiffer.java:230)
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.renderContentAndDiff(DaisyHtmlDiffer.java:166)
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.createOrGetFutureDiff(DaisyHtmlDiffer.java:143)
	at com.atlassian.confluence.diff.DaisyHtmlDiffer.diff(DaisyHtmlDiffer.java:95)
	at com.atlassian.confluence.diff.WikiConvertingHtmlDiffer.diff(WikiConvertingHtmlDiffer.java:31)
	at com.atlassian.confluence.mail.notification.listeners.AbstractNotificationsListener.sendNotification(AbstractNotificationsListener.java:143)
	at com.atlassian.confluence.mail.notification.listeners.AbstractNotificationsListener.sendNotification(AbstractNotificationsListener.java:80)
	at com.atlassian.confluence.mail.notification.listeners.AbstractNotificationsListener.sendNotifications(AbstractNotificationsListener.java:256)
	at com.atlassian.confluence.mail.notification.listeners.AbstractNotificationsListener.sendPageNotifications(AbstractNotificationsListener.java:226)
	at com.atlassian.confluence.mail.notification.listeners.PageNotificationsListener.handleEvent(PageNotificationsListener.java:87)
....

Cause

There are problems with user settings as this only occurs for a particular user in Confluence.

Resolution

  1. Run the following query in database to check if it returns any rows. This OS_PROPERTYENTRY table stores all of the user settings:

    SELECT * FROM OS_PROPERTYENTRY where ENTITY_NAME='CWD_<username>';
    
  2. If it returns one or more rows, this means that some settings are not set to default. So we would like to set them to default by clearing these rows and renaming them to something else:

    UPDATE OS_PROPERTYENTRY SET ENTITY_NAME='CWD_<username>_backup' WHERE ENTITY_NAME='CWD_<username>';
    
  3. Restart Confluence and see if the problem persists

 

To restore the changes that are made above, just run the following query and restart Confluence afterwards

UPDATE OS_PROPERTYENTRY SET ENTITY_NAME='CWD_<username>' WHERE ENTITY_NAME='CWD_<username>_backup';
Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.