Error upgrading Confluence from 6.7.0 to 6.8.0
Asked by Adrian Escoms:

I'm trying to upgrade Confluence server from version 6.7.0 to 6.8.0, with the old home dir and with a new and empty home dir, and I'm getting this error:

```
2018-03-20 22:30:09,871 INFO [localhost-startStop-1] [com.atlassian.confluence.lifecycle] contextInitialized Starting Confluence 6.8.0 [build 7701 based on commit hash 5c86c3545b3c8f6447efaa8d89a83fb420d71987] - synchrony version 2.1.0-release-confluence_6.5-1a01ab2d
2018-03-20 22:30:12,137 WARN [localhost-startStop-1] [com.atlassian.config.ApplicationConfig] setApplicationHome Application home does not exist. Creating directory: /srv/confluence_upgrade/shared-home
2018-03-20 22:30:12,152 INFO [localhost-startStop-1] [atlassian.confluence.cluster.DefaultClusterConfigurationHelper] lambda$populateExistingClusterSetupConfig$1 Populating setup configuration if running with Cluster mode...
2018-03-20 22:30:12,160 WARN [localhost-startStop-1] [atlassian.confluence.cluster.DefaultClusterConfigurationHelper] lambda$populateExistingClusterSetupConfig$1 Could not find shared config file.
2018-03-20 22:30:14,084 INFO [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] earlyStartup Plugin system earlyStartup begun
2018-03-20 22:30:16,557 INFO [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] logTime Plugin system earlyStartup ended
2018-03-20 22:30:16,560 INFO [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] lateStartup Plugin system lateStartup begun
2018-03-20 22:30:17,922 INFO [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] logTime Plugin system lateStartup ended
2018-03-20 22:30:18,443 ERROR [localhost-startStop-1] [ContainerBase.[Standalone].[localhost].[/]] log Exception starting filter messagesDecoratorFilter
java.lang.ClassNotFoundException: com.atlassian.confluence.security.websudo.MessagesDecoratorFilter
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1335)
 at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1163)
 at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:542)
 at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:523)
 at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:264)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4708)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5348)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
2018-03-20 22:30:18,464 FATAL [localhost-startStop-1] [atlassian.spring.container.SpringContainerContext] getComponent Spring Application context has not been set
2018-03-20 22:30:18,464 WARN [localhost-startStop-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextDestroyed Failed to shut down plugin system during ServletContext shutdown: Spring Application context has not been set
2018-03-20 22:30:18,466 INFO [localhost-startStop-1] [com.atlassian.confluence.lifecycle] contextDestroyed Stopping Confluence
2018-03-20 22:30:18,501 INFO [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] shutdown Preparing to shut down the plugin system
2018-03-20 22:30:18,502 INFO [localhost-startStop-1] [atlassian.plugin.manager.DefaultPluginManager] shutdown Shutting down the plugin system
```

Seems error with MessagesDecoratorFilter, but it's impossible to me upgrade the installation.


Answers:
author: AnnWorley
body: Hi Adrian,

I am not 100% sure the errors you posted are related:

```
2018-03-20 22:30:18,443 ERROR [localhost-startStop-1] [ContainerBase.[Standalone].[localhost].[/]] log Exception starting filter messagesDecoratorFilter
java.lang.ClassNotFoundException: com.atlassian.confluence.security.websudo.MessagesDecoratorFilter
```

and:

```

2018-03-20 22:30:18,464 FATAL [localhost-startStop-1] [atlassian.spring.container.SpringContainerContext] getComponent Spring Application context has not been set
```

However, **Resolution 6** on [Confluence does not start due to Spring Application context has not been set](https://confluence.atlassian.com/confkb/confluence-does-not-start-due-to-spring-application-context-has-not-been-set-218278311.html) will replace the Install directory, eliminating any entry in the web.xml that could be causing the error described in: [Error starting Confluence with ClassNotFoundException after upgrading](https://confluence.atlassian.com/confkb/error-starting-confluence-with-classnotfoundexception-after-upgrading-838404277.html)

Please try:
> Reinstall Confluence using a new installation directory and a different home directory. Check if the folder permission for the installer and home directories are correct. Check if the UI comes up as expected using the new installation directory and after finishing the setup, stop confluence and modify the \<install\>/confluence/WEB-INF/classes/confluence-init.properties file pointing to the old home directory. Save the file and start the application again.

In your case, to upgrade, please:

1. Back up your database and home directory.
2. Install a new Confluence 6.8.0 instance, using no data or installation files from your old instance.
3. Log in and make sure it is serving content.
4. Shut down Confluence.
5. Edit the \<install\>/confluence/WEB-INF/classes/confluence-init.properties so the Confluence Home is set to your Confluence 6.7 instance.
6. Start Confluence.
7. The upgrade will run, making changes to your 6.7 database using the database connection details from confluence.cfg.xml (except in the case that you are using a [datasource connection](https://confluence.atlassian.com/doc/configuring-a-datasource-connection-937166084.html) defined in the server.xml file in which case you will want to edit the server.xml to point to your Confluence 6.7 database as in the linked doc)
8. Log into the new instance using your credentials from the Confluence 6.7 instance.

I look forward to hearing whether the upgrade runs using this strategy.

Thanks,

Ann

comments: author: Adrian Escoms
body: I'll try it as soon as possible and reply you with the result

Thank you for the answer!