Cloud Migration Assistant for Confluence link - Stack trace error?
Asked by Antony Grinyer:

Hello all,

We have recently upgraded our old version of Confluence from version 5.9 to 5.10 to enable us to use the Cloud Migration Assistant for Confluence (CMAC) to migrate our Confluence spaces to our new Cloud instance.

After installing the CMAC add-on and selecting the link in the Confluence Administration area, we get an error and large stack trace shown below, which seems to point to this error: **"The database name component of the object qualifier must be the name of the current database"**

Having Googled this issue there does not appear to be a direct solution related to CMAC, however some suggestions state this error may occur if the Confluence SQL database does not match the database name in the hibernate.connection.url property in the confluence.cfg.xml file. We've checked and the database name is 'Confluencedatabase' in SQL and the hibernate.connection.url property is 'confluencedatabase' - the difference is case sensitivity of the database name.

Before we make any changes, has anyone experienced this error below with CMAC and could the case sensitivity between database names be the problem?

Many thanks.

--------

Oops - an error has occurred {#toc-hId--1409732564}
---------------------------------------------------

[![logo](http://confluence:8090/images/logo/confluence_48_white.png "Confluence")](http://confluence:8090/)System Error {#toc-hId-1077780269}
---------------------------------------------------------------------------------------------------------------------------------------------

A system error has occurred --- our apologies!

For immediate troubleshooting, consult our **[knowledge base](http://confluence.atlassian.com/display/CONFKB/Confluence+Knowledge+Base+Home)** for a solution.

If you would like to receive support from Atlassian's support team, ask your **[Confluence administrator](http://confluence:8090/contactadministrators.action)** to create a support issue on [Atlassian's support system](http://support.atlassian.com/) with the following information:

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

Your Confluence administrator can use the **[support request form](http://confluence:8090/admin/raisesupportrequest.action)** to create a support ticket which will include this information.

We will respond as promptly as possible.  
Thank you!

[**Return to site homepage...**](http://confluence:8090/)

### Cause {#toc-hId-1768341743}

org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getInitialState' in class com.atlassian.migration.agent.web.AppAction threw exception com.atlassian.util.concurrent.LazyReference$InitializationException: javax.persistence.PersistenceException: Failed to update database schema at /templates/app.vm\[line 21, column 44\]  
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)

caused by: com.atlassian.util.concurrent.LazyReference$InitializationException: javax.persistence.PersistenceException: Failed to update database schema  
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

caused by: javax.persistence.PersistenceException: Failed to update database schema  
at com.atlassian.migration.agent.store.jpa.impl.LiquibaseSchemaUpgrader.upgrade(LiquibaseSchemaUpgrader.java:35)

caused by: liquibase.exception.MigrationFailedException: Migration failed for change set META-INF/db-changelog/5-attachment-migration-version.xml::5-attachment-migration-version-drop-index::MPT: Reason: META-INF/db-changelog/master.xml : Index Exists Precondition: MIG_ATTACH_SITE_PROGRESS_IDX on MIG_ATTACHMENT : The database name component of the object qualifier must be the name of the current database.  
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:559)

caused by: liquibase.exception.PreconditionErrorException: Precondition Error  
at liquibase.precondition.core.IndexExistsPrecondition.check(IndexExistsPrecondition.java:123)

caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: java.sql.SQLException: The database name component of the object qualifier must be the name of the current database.  
at liquibase.snapshot.jvm.ForeignKeySnapshotGenerator.addTo(ForeignKeySnapshotGenerator.java:110)

caused by: liquibase.exception.DatabaseException: java.sql.SQLException: The database name component of the object qualifier must be the name of the current database.  
at liquibase.snapshot.ResultSetCache.get(ResultSetCache.java:101)

caused by: java.sql.SQLException: The database name component of the object qualifier must be the name of the current database.  
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)

\<\<snip\>\>


Answers:
author: Antony Grinyer
body: We fixed this by editing the hibernate.connection.url property in the confluence.cfg.xml file to ensure that the case matches that of the database.


Tags: confluence-server

migration

server