Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade fails due to Schema problems

Jens Koblitz May 2, 2019

Today I tried to upgrade our Confluence from 6.0.6 to 6.15.x 

The upgrade fails with the message that the schema could not be updated. After having a painfull look at the logs I found that I face exactly the same error message as described in https://confluence.atlassian.com/confkb/upgrade-failed-application-will-not-start-com-atlassian-config-configurationexception-cannot-update-schema-947849026.html

However, this is of no help for me, since the table "ATTACHMENTS" which is mentioned in the above article does not exist. Any having experience with this and can give me a helping hand? 

 

Kind regards, 

Jens

2 answers

1 accepted

2 votes
Answer accepted
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2019

Hello Jens,

Sorry to hear you're having trouble upgrading Confluence.

Could you please outline the exact steps you took when upgrading, and what database and version you are using?

Please feel free to include the lines of log from your own Confluence server log as well. You can send just the bits that refer to the actual failure.

Thank you!

Regards,

Shannon

Jens Koblitz May 14, 2019

Hello Shannon,

 

We are using MySQL 5.5.34. 
The steps I take are the same as I did so many times before:

- Downloaded the latest version
- Added the .jar for the MySQL Connector
- Modified the confluence-init.properties to point to our home dir
- started Confluence

And than this happens:

Jens Koblitz May 14, 2019 edited
2019-05-02 17:32:22,618 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades Upgrade failed, application will not start: com.atlassian.config.ConfigurationException: Cannot update schemacom.atlassian.confluence.upgrade.UpgradeException: com.atlassian.config.ConfigurationException: Cannot update schema at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:135) at com.atlassian.confluence.plugin.PluginFrameworkContextListener.launchUpgrades(PluginFrameworkContextListener.java:119) at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:79) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4682) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)Caused by: com.atlassian.config.ConfigurationException: Cannot update schema at com.atlassian.confluence.impl.core.persistence.hibernate.schema.ConfluenceSchemaHelper.validateSchemaUpdateIfNeeded(ConfluenceSchemaHelper.java:117) at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.validateSchemaUpdateIfNeeded(DefaultUpgradeManager.java:73) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:120) ... 14 moreCaused by: org.hibernate.tool.schema.spi.SchemaManagementException: Attempt to resolve foreign key metadata from JDBC metadata failed to find column mappings for foreign key named [FKF0E7436E34A4917E] at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl$ForeignKeyBuilderImpl.build(InformationExtractorJdbcDatabaseMetaDataImpl.java:885) at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl$ForeignKeyBuilderImpl.build(InformationExtractorJdbcDatabaseMetaDataImpl.java:866) at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getForeignKeys(InformationExtractorJdbcDatabaseMetaDataImpl.java:849) at org.hibernate.tool.schema.extract.internal.TableInformationImpl.foreignKeys(TableInformationImpl.java:97) at org.hibernate.tool.schema.extract.internal.TableInformationImpl.getForeignKey(TableInformationImpl.java:108) at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.findMatchingForeignKey(AbstractSchemaMigrator.java:446) at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applyForeignKeys(AbstractSchemaMigrator.java:419) at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:245) at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:110) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:87) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:58) at com.atlassian.confluence.impl.core.persistence.hibernate.schema.ConfluenceSchemaHelper.validateSchemaUpdateIfNeeded(ConfluenceSchemaHelper.java:114) ... 16 more2019-05-02 17:32:22,629 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades 1 errors were encountered during upgrade:2019-05-02 17:32:22,629 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades 1: Cannot update schema
Jens Koblitz May 14, 2019

2019-05-02 17:32:22,618 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades Upgrade failed, application will not start: com.atlassian.config.ConfigurationException: Cannot update schemacom.atlassian.confluence.upgrade.UpgradeException: com.atlassian.config.ConfigurationException: Cannot update schema at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:135) at com.atlassian.confluence.plugin.PluginFrameworkContextListener.launchUpgrades(PluginFrameworkContextListener.java:119) at com.atlassian.confluence.plugin.PluginFrameworkContextListener.contextInitialized(PluginFrameworkContextListener.java:79) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4682) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)Caused by: com.atlassian.config.ConfigurationException: Cannot update schema at com.atlassian.confluence.impl.core.persistence.hibernate.schema.ConfluenceSchemaHelper.validateSchemaUpdateIfNeeded(ConfluenceSchemaHelper.java:117) at com.atlassian.confluence.upgrade.impl.DefaultUpgradeManager.validateSchemaUpdateIfNeeded(DefaultUpgradeManager.java:73) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.upgrade(AbstractUpgradeManager.java:120) ... 14 moreCaused by: org.hibernate.tool.schema.spi.SchemaManagementException: Attempt to resolve foreign key metadata from JDBC metadata failed to find column mappings for foreign key named [FKF0E7436E34A4917E] at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl$ForeignKeyBuilderImpl.build(InformationExtractorJdbcDatabaseMetaDataImpl.java:885) at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl$ForeignKeyBuilderImpl.build(InformationExtractorJdbcDatabaseMetaDataImpl.java:866) at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getForeignKeys(InformationExtractorJdbcDatabaseMetaDataImpl.java:849) at org.hibernate.tool.schema.extract.internal.TableInformationImpl.foreignKeys(TableInformationImpl.java:97) at org.hibernate.tool.schema.extract.internal.TableInformationImpl.getForeignKey(TableInformationImpl.java:108) at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.findMatchingForeignKey(AbstractSchemaMigrator.java:446) at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applyForeignKeys(AbstractSchemaMigrator.java:419) at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:245) at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:110) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:87) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:58) at com.atlassian.confluence.impl.core.persistence.hibernate.schema.ConfluenceSchemaHelper.validateSchemaUpdateIfNeeded(ConfluenceSchemaHelper.java:114) ... 16 more2019-05-02 17:32:22,629 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades 1 errors were encountered during upgrade:2019-05-02 17:32:22,629 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades 1: Cannot update schema

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 15, 2019

Hello Jens,

Thank you for sharing that information. It does appear similar to the issue listed below:

Despite the fact that you were not using the database to store your attachments, I would still review the steps above to diagnose.

Let us know what comes back.

Lastly, you should know that MySQL 5.5 is not compatible with Confluence 6.15.x, so you should be on either MySQL 5.6 or 5.7. See Supported Platforms for more details. You will need to migrate to the new database using Migrating to Another Database documentation for that.

Regards,

Shannon

Jens Koblitz May 15, 2019

Hello Shannon, 

I already tried that solution but without any success. I will try updating MySQL tomorrow and let you know if that helps.

 

Kind regards,

 

Jens

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 16, 2019

Hi Jens,

Thank you for letting me know. There's a chance you might need ensure that Confluence is on a supported database prior to upgrading Confluence.

The procedure could look like this:

  1. Create a brand-new MySQL 5.7 Database.
  2. Install a new instance of Confluence 6.15.x
  3. Install MySQL driver.
  4. Connect to new MySQL 5.7 Database
  5. On import step, import your backup from 6.0.6.

I recommend that you try FIRST the method in our documentation, but if all else fails, you can try this method.

Regards,

Shannon

Jens Koblitz June 6, 2019

Hi Shannon, 

 

sorry for my late response, my wife´s pregnancy kept me from taking care of our Concfluence. Good news: The update to MySQL 5.7 did the trick and now everything works like charm. Thank you very, very much!

 

kindest regards,

 

Jens

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 6, 2019

Jens,

No worries at all. Hope everything is okay!

Happy to hear you were able to get Confluence upgraded! Take care, and have a pleasant rest of your week.

Regards,

Shannon

0 votes
JP _AC Bielefeld Leader_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 2, 2019

Hi,

I would open a support ticket with the Atlassian team. An upgrade from an old version like 6.0.6 to 6.15.x is something special. Did you store the attachments in the database with your 6.0.6 version?

Best

JP

Jens Koblitz May 2, 2019

No, all attachements are saved in the Home-Folder.

Jens Koblitz May 2, 2019

Seems a support-Ticket with the Atlassian team is not possible for the starter license :(

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events