Upgrading Confluence from 5.6.6 WAR to 6.5
Asked by Norbert Hermann:

Hello,

I've trouble with upgrading Confluence from 5.6.6 WAR to 6.5

The Change from WAR to Standalone was successfull, but now I'm really facing a problem.

- all incompatible or unknown plugins were disabled  
- the collation of the database was checked  
- max_allowed_package is 256M

Has anybody here got any ideas?

###

logo System Error  

A system error has occurred --- our apologies!  

For immediate troubleshooting, consult our knowledge base for a solution.  

If you would like to receive support from Atlassian's support team, ask your Confluence administrator to create a support issue on Atlassian's support system with the following information:  

a description of your problem and what you were doing at the time it occurred  
a copy of the error and system information found below  
a copy of the application logs (if possible).  

Your Confluence administrator can use the support request form to create a support ticket which will include this information.  

We will respond as promptly as possible.  
Thank you!  

Return to site homepage...  
Cause  

java.lang.reflect.UndeclaredThrowableException  
at com.sun.proxy.$Proxy79.permissionExists(Unknown Source)  

caused by: java.lang.reflect.InvocationTargetException  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  

caused by: org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL \[n/a\]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet  
at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:224)  

caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet  
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)  

caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'spacepermi0_.PERMALLUSERSSUBJECT' in 'field list'  
at sun.reflect.GeneratedConstructorAccessor278.newInstance(Unknown Source)  
Stack Trace:\[hide\]  

<br />


Answers:
author: Shannon S
body: Norbert,

Seems there may be a problem with your database. Can you let us know your database and version, and confirm your collation there?

Regards,

Shannon

comments: author: Norbert Hermann
body: Hi Shannon,

the database is mysql 5.5.59  
charset utf8 collation utf8_bin

Thanks

Norbert


author: Shannon S
body: Norbert,

Thank you for your confirmation. Since MySQL 5.5\* [isn't supported in Confluence 6.5](https://confluence.atlassian.com/conf65/supported-platforms-939702042.html), I would recommend moving to MySQL 5.6 or higher.

1. [Create a supported MySQL Database](https://confluence.atlassian.com/conf65/database-setup-for-mysql-939701702.html) using these instructions.
2. [Migrate your data from the 5.5\* database](https://confluence.atlassian.com/conf65/migrating-to-another-database-939701705.html) to the new database.

Once you've completed this, if you're still having problems, please let me know.

Regards,

Shannon


author: Norbert Hermann
body: Oh, okay, this is currently a problem in our environment.  
Is it possible to migrate the database to PostgreSQL?


author: Shannon S
body: Norbert,

Yes, that's possible too.

1. First, it must be one of the versions here:
   1. ![(tick)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/check.png) PostgreSQL 9.2
   2. ![(tick)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/check.png) PostgreSQL 9.3
   3. ![(tick)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/check.png) PostgreSQL 9.4
   4. ![(tick)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/check.png) PostgreSQL 9.5
   5. ![(tick)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/check.png) PostgreSQL 9.6
2. You can setup the database using this procedure: [Database setup for PostgreSQL](https://confluence.atlassian.com/conf65/database-setup-for-postgresql-939701689.html)
3. Then, migrate your data using the same procedure from earlier: [Migrating to another database](https://confluence.atlassian.com/conf65/migrating-to-another-database-939701705.html?_ga=2.208928854.51859672.1521448220-1485076413.1519291985)

Let me know if you run into any issues.

Shannon


author: Norbert Hermann
body: Hi Shannon

I get an internal server error when I start the backup.

What can I do?


author: Shannon S
body: Norbert,

We would need to see the actual error, but you can follow this article to troubleshoot XML backup errors:

* [XML Backups and Space Export/Import Troubleshooting](https://confluence.atlassian.com/confkb/xml-backups-and-space-export-import-troubleshooting-180294700.html)

Once you've gone through that article if you're still having issues please let us know the full error message you are seeing.

Regards,

Shannon


author: Norbert Hermann
body: Hi Shannon,

the backup was successfully completed in the background.

Now I'm facing the next problem. The restore process only runs up to 4% of completion.  
The estimated time is rising steadily, currently it is over 16 hours.


author: Shannon S
body: Hi Norbert,

We will still need to know what error logs are occurring, so have a look at the [Confluence server logs](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html) to see what that might be.

I would still recommend reviewing the article I sent you earlier since it also deals with imports, but have a look as well here:

* [Troubleshooting XML backups that fail on restore](https://confluence.atlassian.com/doc/troubleshooting-xml-backups-that-fail-on-restore-199034.html)

Can you also let me know how large the backup is?

Shannon


author: Norbert Hermann
body: it's trouble with the java heap space.  
How can I change the heap space during installation?  
The backup file is about 10 GB in size


author: Shannon S
body: Hi Norbert,

You can increase memory following this documentation:

* [How to fix out of memory errors by increasing available memory](https://confluence.atlassian.com/confkb/how-to-fix-out-of-memory-errors-by-increasing-available-memory-154071.html)

Have a look there and let us know if you have any trouble.

Regards,

Shannon