Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-23316

XHTML migration dies on java.io.IOException: The character '^K' is an invalid XML character

      The XHTML migration dies on this exception:

      2011-09-21 13:18:13,123 ERROR [http-8090-3] [admin.actions.upgrade.ForceUpgradeAction] doInTransactionWithoutResult Upgrade failed with exception: java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.owasp.validator.html.ScanException: java.io.IOException: The character '^K' is an invalid XML character
       -- referer: http://localhost:8090/admin/do-force-upgrade.action?atl_token=b867c36fd0d30b43f1f3a79338556e13ce5f4eac&upgradeTaskToRun=wikiToXhtmlMigrationUpgradeTask&confirm=Force+Upgrade | url: /admin/do-force-upgrade.action | userName: admin | action: do-force-upgrade
      com.atlassian.confluence.content.render.xhtml.migration.exceptions.MigrationException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: org.owasp.validator.html.ScanException: java.io.IOException: The character '^K' is an invalid XML character
              at com.atlassian.confluence.content.render.xhtml.migration.DefaultWikiToXhtmlSiteMigrator.migrateSite(DefaultWikiToXhtmlSiteMigrator.java:164)
              at com.atlassian.confluence.upgrade.upgradetask.WikiToXhtmlMigrationUpgradeTask.doDeferredUpgrade(WikiToXhtmlMigrationUpgradeTask.java:40)
              at com.atlassian.confluence.admin.actions.upgrade.ForceUpgradeAction$1.doInTransactionWithoutResult(ForceUpgradeAction.java:85)
              at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
              at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
              at com.atlassian.confluence.admin.actions.upgrade.ForceUpgradeAction.execute(ForceUpgradeAction.java:103)
              at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
              at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
              at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      

      It looks like the whole process dies, and not just the batch. Forcing the upgrade task again fails at the same point.

            [CONFSERVER-23316] XHTML migration dies on java.io.IOException: The character '^K' is an invalid XML character

            I upgraded from confluence 3.4.9 --> 3.5.13 --> 4.0 last night and had to roll back to 3.5.13 due to this issue. We are reluctant to edit the DB manually not knowing what the impact will be.

            I didn't notice this in my test environment, but I'm going to go back and try this again there to see what happens. If you have a newer release with this fix in it, I'm happy to give that a go for you and provide all the logs.

            Darryl Vezina added a comment - I upgraded from confluence 3.4.9 --> 3.5.13 --> 4.0 last night and had to roll back to 3.5.13 due to this issue. We are reluctant to edit the DB manually not knowing what the impact will be. I didn't notice this in my test environment, but I'm going to go back and try this again there to see what happens. If you have a newer release with this fix in it, I'm happy to give that a go for you and provide all the logs.

            Actually I've found much more control characters which I have had to remove manually from DB. Thanks for fixing that issue soon.

            Lukas Koranda added a comment - Actually I've found much more control characters which I have had to remove manually from DB. Thanks for fixing that issue soon.

            RE: Lukas Koranda, the latest comment in your support ticket indicates that the issue in your migration was not with the british pound symbol but with the record separator symbol ("^^" with ASCII value 30).

            This is addressed in the upcoming fix.

            dave (Inactive) added a comment - RE: Lukas Koranda, the latest comment in your support ticket indicates that the issue in your migration was not with the british pound symbol but with the record separator symbol ("^^" with ASCII value 30). This is addressed in the upcoming fix.

            We've discovered that this is due to Xerces complaining about control characters in the range of 0 to 32 (exclusive of 32, 9, 10, 13) being found in CDATA.

            We are working on a fix that will strip these characters before we allow Xerces a chance at processing them.

            dave (Inactive) added a comment - We've discovered that this is due to Xerces complaining about control characters in the range of 0 to 32 (exclusive of 32, 9, 10, 13) being found in CDATA. We are working on a fix that will strip these characters before we allow Xerces a chance at processing them.

            It happens for me in the same manner but in my case it stops on British pound sign. This is really silly.

            Lukas Koranda added a comment - It happens for me in the same manner but in my case it stops on British pound sign. This is really silly.

              dave@atlassian.com dave (Inactive)
              alaskowski Adam Laskowski (Inactive)
              Affected customers:
              6 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: