Unable to edit Confluence pages after upgrade to 4.3.6

After converting Confluence to 4.3.6 some pages file to upgrade to xhtml (which could be expected). When opening the page for edit however noting, except the titel, is shown on the screen.

When doing a reindexing the log shows:

java.lang.UnsupportedOperationException: The body of this ContentEntityObject ('Operations Procedure manual Infrastructure Management Process') was 'BodyType:WIKI' but was expected to be 'BodyType:XHTML'

Please see attachments for information on

* Edit screen

* View Source

* View storage format

Please note that this is upgrade test installation but the error hinders our testing efforts.

1 answer

1 accepted

I have worked with Lars on a support ticket for this issue. At the beginning, this seem to be a known issue that is covered in this KB https://confluence.atlassian.com/display/CONFKB/Confluence+4.0+Editor+is+Blank. However, when re-running the content migration, it keeps failing with this error:

2013-02-11 11:49:20,165 ERROR [http-8090-30] [admin.actions.upgrade.ForceUpgradeAction] doInTransactionWithoutResult Upgrade failed with exception: java.util.concurrent.ExecutionException: java.lang.IllegalStateException
 -- url: /admin/do-force-upgrade.action | userName: p950lbj | referer: http://lx60773.sbcore.net/admin/force-upgrade.action | action: do-force-upgrade
com.atlassian.confluence.content.render.xhtml.migration.exceptions.MigrationException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException
	at com.atlassian.confluence.content.render.xhtml.migration.DefaultWikiToXhtmlSiteMigrator.migrateSite(DefaultWikiToXhtmlSiteMigrator.java:163)
	at com.atlassian.confluence.upgrade.upgradetask.WikiToXhtmlMigrationUpgradeTask.doDeferredUpgrade(WikiToXhtmlMigrationUpgradeTask.java:40)
	at com.atlassian.confluence.admin.actions.upgrade.ForceUpgradeAction$1.doInTransactionWithoutResult(ForceUpgradeAction.java:86)
.....
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
	at com.atlassian.confluence.content.render.xhtml.migration.DefaultWikiToXhtmlSiteMigrator.migrateSite(DefaultWikiToXhtmlSiteMigrator.java:144)
	... 223 more
Caused by: java.lang.IllegalStateException
	at org.apache.batik.css.parser.CSSLexicalUnit.getIntegerValue(CSSLexicalUnit.java:119)
	at org.owasp.validator.css.CssValidator.lexicalValueToString(CssValidator.java:389)
	at org.owasp.validator.css.CssValidator.isValidProperty(CssValidator.java:101)
.....

This was quite hard to catch as it's failing in the first 500pages batch. We managed to fix this by narrowing down the culprit. Basically, there was one (few) page that is causing the failure. How we narrowed it down is by:

  1. As shown here, you could reduce the batch size to 1 by adding the following flag in your system property:
    -Dconfluence.wiki.migration.batch.size=1
  2. Restart Confluence and rerun the migration. Since we have reduced the batch size from 500 to 1, this will ensure that Confluence will migrate each page despite there would be few pages that are still failing.
  3. Run the following SQL query to check which pages are still failing in the migration:
    select bodytypeid, contentid from BODYCONTENT where contentid in (select contentid from CONTENT where prevver is null and contenttype in ('PAGE','BLOGPOST')) and bodytypeid=0;

  4. Visit that page, edit it or delete it by hitting into this URL <Confluence-URL>/pages/viewpage.action?pageId=<PageID>
  5. Rerun the migration again and voila!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Thursday in Off-topic

Friday Fun: Magic Eyes

...staring into the background. Once the image pops out in 3D, you can look around the picture and enjoy. If you will see if you are a true illusion master! :) You did it? :) Wow! Awesome! As a bonus...

463 views 83 11
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you