XML Import Failed Due to Missing Column for PAGETEMPLATES Table
症状
The Confluence instance from which the XML backup was taken has been upgraded from a version of Confluence prior to 4.0.
atlassian-confluence.log
に次のメッセージが表示される。
java.lang.RuntimeException: Error rendering template for decorator root
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186)
caused by: java.lang.RuntimeException: Error rendering template for decorator page
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186) "
診断
Run this query against the database of the source Confluence instance from which the backup was taken:
show columns from PAGETEMPLATES;
There is a LABELS column in the source/old confluence, but no LABELS column in the target/new Confluence's PAGETEMPLATES table:
Old/Source confluence's PAGETEMPLATES
TEMPLATEID | bigint(20) | いいえ | PRI | NULL | |
Template Name | varchar(255) | いいえ | NULL | ||
TEMPLATEDESC | varchar(255) | はい | NULL | ||
ラベル | varchar(255) | はい | NULL | ||
CONTENT | mediumtext | はい | NULL | ||
SPACEID | bigint(20) | はい | MUL | NULL | |
PREVVER | bigint(20) | はい | MUL | NULL | |
VERSION | int(11) | いいえ | NULL | ||
CREATOR | varchar(255) | はい | NULL | ||
Creation Date | datetime | はい | NULL | ||
LASTMODIFIER | varchar(255) | はい | NULL | ||
LASTMODDATE | datetime | はい | NULL | ||
BODYTYPEID | smallint(6) | はい | NULL |
New/Target confluence's PAGETEMPLATES
TEMPLATEID | bigint(20) | いいえ | PRI | NULL | |
Template Name | varchar(255) | いいえ | NULL | ||
TEMPLATEDESC | varchar(255) | はい | NULL | ||
CONTENT | mediumtext | はい | NULL | ||
SPACEID | bigint(20) | はい | MUL | NULL | |
PREVVER | bigint(20) | はい | MUL | NULL | |
VERSION | int(11) | いいえ | NULL | ||
CREATOR | varchar(255) | はい | NULL | ||
Creation Date | datetime | はい | NULL | ||
LASTMODIFIER | varchar(255) | はい | NULL | ||
LASTMODDATE | datetime | はい | NULL | ||
BODYTYPEID | smallint(6) | はい | NULL |
原因
The LABELS column has been deprecated since Confluence 4.0.
回避策
Install a fresh, empty Confluence 3.5 with a new database, then upgrade Confluence to be the same version as your Source Confluence instance. This way the target database will contain the deprecated LABELS column in the PAGETEMPLATES table.
注意
Confluence does not support backward version compatibility. You cannot restore backups from a newer version to an older version or across major versions. For example, if you create a site backup in Confluence 2.4.3, it cannot be restored into a Confluence 2.2.2 site. It can however, be restored into 2.4.5 or 2.5.x, because 2.4.5 and 2.5.x are newer versions of Confluence. Importing an old XML backup file to a new major version (for example, Confluence 3.5 to Confluence 4.0) is not supported.