Upgrade from 5.1.2 to 5.5.2 now shows HTTP Status 500
Asked by Ross C:

Hi All,

After doing a standard upgrade from 5.1.2 to 5.5.2 I (runnign the .bin file etc) I am now greeted with a HTTP Status 500 error.

The full error via browser can be seen here, <http://justpaste.it/fu6j>

A quick dump of the catalina.out log file is here, <http://justpaste.it/fu6k>

Google'd this to death, there were a few hits on atlassian's site including this answers section. Most reference correcting database / tables schema to be utf8, I checked all this and it looked fine.

Some users made reference to a license problem when behind a NAT or Port foward, I am not behind either so not sure if this is applicable.

There was a mention to clear working directory, I shutdown confluence, cleared work dir, and restart with no change.

Not sure where to go from here. Any help would be appreciated.

Cheers,  
Ross


Answers:
author: Matthew Rooney
body: Hi Ross, Did you find a resolution to this issue?


author: FelipeA
body: Hi Ross,

Please run these queries:

```
SELECT * FROM information_schema.COLUMNS WHERE table_schema = '&lt;databasename&gt;' AND collation_name != 'utf8_bin';SELECT * FROM information_schema.TABLES WHERE table_schema = '&lt;databasename&gt;' AND table_collation != 'utf8_bin';
```

They should not return any rows, and if they do, you need to follow this procedure to correct your database collation: [](https://confluence.atlassian.com/display/CONFKB/How+to+Change+All+Columns%27+Collation+to+utf8_bin+in+MySQL)[https://confluence.atlassian.com/display/CONFKB/How+to+Change+All+Columns%27+Collation+to+utf8_bin+in+MySQL](https://confluence.atlassian.com/display/CONFKB/How+to+Change+All+Columns%2527+Collation+to+utf8_bin+in+MySQL)

Best Regards,

Felipe Alencastro

comments: author: FelipeA
body: ```
They should not return any rows, and if they do you need to run this procedure: https://confluence.atlassian.com/display/CONFKB/How+to+Change+All+Columns%27+Collation+to+utf8_bin+in+MySQL
```


author: Ross C
body: Hi Felipe,

Thanks for the suggestion.

Your suggestion is similar to Wayne's, which I had already tried. However I did run the commands you suggested again with no results to either query.


author: Wayne Wong
body: Hi,

It seem like you have bumped into this issue :https://confluence.atlassian.com/display/CONFKB/Unknown+column+'this.external_id'+when+upgrading+to+Confluence+5.2.5+or+above+on+MySQL

which is caused by your database collation, to check that,

just kindly run below is query:  
`SELECT` `schema_name, default_character_set_name, default_collation_name ``FROM` `schemata ``WHERE` `schema_name = ``'<DATABASE_NAME>'` `AND` `(default_character_set_name <> ``'utf8'` `OR` `default_collation_name <> ``'utf8_bin'``);`  
`SELECT` `table_name, table_collation, engine ``FROM` `tables ``WHERE` `table_schema = ``'<DATABASE_NAME>'` `AND` `table_collation <> ``'utf8_bin'``;`  
`SELECT` `table_name, column_name, character_set_name, collation_name ``FROM` `columns ``WHERE` `table_schema = ``'<DATABASE_NAME>'` `and` `data_type ``in` `(``'varchar'``, ``'text'``) ``and` `(character_set_name <> ``'utf8'` `OR` `collation_name <> ``'utf8_bin'``);`  

I would like to suggest you to create a support ticket for your case

comments: author: Ross C
body: Hi Wayne,

Thanks for the suggestion, I did run those commands, but got no results. I ran a few other commands to check both the database and tables all reporting utf8.

If I can't get to the bottom of it in the next few days I will contact Support.

Unless others have any suggestions.


author: Wayne Wong
body: Hi,

It seem like you have bumped into this issue :https://confluence.atlassian.com/display/CONFKB/Unknown+column+'this.external_id'+when+upgrading+to+Confluence+5.2.5+or+above+on+MySQL

which is caused by your database collation, to check that,

just kindly run below is query:  
`SELECT` `schema_name, default_character_set_name, default_collation_name ``FROM` `schemata ``WHERE` `schema_name = ``'<DATABASE_NAME>'` `AND` `(default_character_set_name <> ``'utf8'` `OR` `default_collation_name <> ``'utf8_bin'``);`  
`SELECT` `table_name, table_collation, engine ``FROM` `tables ``WHERE` `table_schema = ``'<DATABASE_NAME>'` `AND` `table_collation <> ``'utf8_bin'``;`  
`SELECT` `table_name, column_name, character_set_name, collation_name ``FROM` `columns ``WHERE` `table_schema = ``'<DATABASE_NAME>'` `and` `data_type ``in` `(``'varchar'``, ``'text'``) ``and` `(character_set_name <> ``'utf8'` `OR` `collation_name <> ``'utf8_bin'``);`  

I would like to suggest you to create a support ticket for your case


Tags: confluence-administration