Hi Martti,
I am glad the issue is now solved.
The reason you didn't find the TEC doc is that it does not include the whole error message. I will now correct it so you will be able to find it with message:
ERROR: Upgrade failed for tenant
You could also consider searching for error messages by the first message in the stack trace, i.e.:
at com.niku.security.service.AuthenticationService.removeSessionCaches
This should return the exact error (in TEC578077 it is unfortunately mistyped, so I am going to correct this too).
In my opinion, the message:
WARN 2013-06-16 19:06:53,844 [Config Monitor] config.TenantConfigurationManager (none:none:none:none) Found invalid database connection for local tenant clarity
is not the actual issue, but a consequence of it (due to the error, the database could not get upgraded to the correct level, so there is a warning thrown later that there is a database version mismatch).
Considering the fixes : this defect is fixed in the 13.1.0.1 fix pack (and the subsequent cumulative fix packs 13.1.0.x), for which the latest one is available when you actually select 13.1 level 0000:
When said fixed means that the fix will actually modify the exact call to the method in order to handle any similar issues with extra entries in future. This doesn't mean this will work for the direct upgrade to 13.1 : this will be solved for any further upgrades (to 13.2 i.e.).
To solve this issue while upgrading to 13.1, please just use the workaround per above (replacing the file with its template).
Regards
Nika