Confluence failing to open with error following a failed XML restore
Asked by Ajay Madar:

Hello I have just tried a XML restore from our Production site (v5.9.8) into our test site (v6.9.0) but the restore failed and now when I access Confluence I get an error as follows:

*org.apache.velocity.exception.MethodInvocationException: Invocation of method 'isShowSignUp' in class com.atlassian.confluence.user.actions.LoginAction threw exception java.lang.NullPointerException: Application cannot be null at /login.vm\[line 6, column 28\]*   
*at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)*

*caused by: java.lang.NullPointerException: Application cannot be null*   
*at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226)*

I found this article online "<https://confluence.atlassian.com/confkb/confluence-returns-system-error-due-to-invocation-of-method-isshowsignup-in-class-com-atlassian-confluence-user-actions-loginaction-threw-exception-java-lang-nullpointerexception-at-login-vm-693899125.html?_ga=2.97440476.2116427662.1527608717-110770452.1527608717>" but my DBA says that the table = cwd_app_dir_mapping does not contain any data.

Regards,

Ajay


Answers:
author: Ajay Madar
body: Just to add that when restoring the XML file I got the following error on Confluence\>backup \& restore page:

com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: XML document structures must start and end within the same entity.

comments: author: AnnWorley
body: Hi Ajay,

If the objective is to clone Production on the test instance please spin up a new Confluence 5.9.8 on the test server, import the backup from Production and then upgrade the test instance as described in [Upgrading Confluence](https://confluence.atlassian.com/doc/upgrading-confluence-4578.html).

The in-product documentation is misleading as it says you can upload a backup "from Confluence 4.0 and later, and space imports from Confluence 5.3 and later."

As recorded in this bug report, the information apppears to be inaccurate:

[Inaccurate XML Import documentation and text on Confluence Admin\>\>Backup and restore](https://jira.atlassian.com/browse/CONFSERVER-36586)

Between Confluence 5.9.x and 6.9.x there have been many schema changes taht can not be anticipated by the older exports. Our doc, [Upgrading Confluence](https://confluence.atlassian.com/doc/upgrading-confluence-4578.html) mentions:
> XML backups should **not** be used to upgrade Confluence.

Thanks,

Ann


author: Ajay Madar
body: Thanks for the response Ann. We will update our upgrade plan for Confluence accordingly.

Ajay


author: Aaron Gasperi
body: Hi [@AnnWorley](/t5/user/viewprofilepage/user-id/502040), I'm running into a similar problem. I have a Confluence XML export that is at least a year old, but do not have notes as to which version created the export. I took the approach of installing the most recent version of confluence and attempting an import, but ran into a similar error.

Would it make sense to:

1) Identify the version of Confluence that output the XML export

2) Install historical version of Confluence.

3) Perform XML import

4) Upgrade Confluence

If so -- can you give me any tips on how to find out which version of Confluence output an XML Export from the export files?

Thank you for your help!

Aaron


Tags: confluence-server

server