"The component of the database name of the object qualifier must be the name of the current database" error on upgrade to Confluence 6.1+

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

問題

Confluence throws the following database error while trying to upgrade to 6.1.0 or later when using Microsoft SQL Server database:

Caused by: java.sql.SQLException: The database name component of the object qualifier must be the name of the current database.

診断

環境

  • Microsoft SQL Server

原因

  1. The database name set in <home-directory>/confluence.cfg.xml does not match the name of the Microsoft SQL database. The database name is case-sensitive.
  2. If upgrading to the latest version (6.15.x), you may be hitting the following bug: CONFSERVER-58264 - Getting issue details... STATUS
  3. if upgrading to a version before 6.2.2, you may be hitting the following bug: CONFSERVER-52103 - Getting issue details... STATUS

Resolution for Confluence 6.6.x or later

  1. Confluence を停止します。

  2. Back up your home directory and installation directory before making any changes.

  3. Get the name of your database by running this SQL query:

    SELECT name, database_id, create_date  
    FROM sys.databases;  


    1. If you configured the database with a JDBC URL when you set up Confluence, compare the database name from step 3, with the database name configured in the hibernate.connection.url property in your <home-directory>/confluence.cfg.xml file. 

      <property name="hibernate.connection.url">jdbc:sqlserver://<hostname>:<port>;databaseName=<database></property>
    2. If you configured the database with a JNDI datasource when you set up Confluence (assuming you followed this documentation page for JNDI datasource configuration), compare the database name from step 3, with the database name in the url attribute, located in the JNDI Datasource configuration in your <installation-directory>/conf/server.xml file.

      <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
               username="yourDatabaseUser"
               password="yourDatabasePassword"
               driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
               url="jdbc:sqlserver://<hostname>:<port>;databaseName=<database>"
               maxTotal="60"
               maxIdle="20"
               validationQuery="select 1" />
  4. Update the database name so that it matches the name of the database from the SQL query in step 3 (note it is case sensitive)
  5. Confluence を起動します。

Resolution for Confluence 6.5.x or earlier

The steps are the same with the exception being the connection URL and JTDS driver

  1. Confluence を停止します。

  2. Back up your home directory and installation directory before making any changes.

  3. Get the name of your database by running this SQL query:

    SELECT name, database_id, create_date  
    FROM sys.databases;  


    1. If you configured the database with a JDBC URL when you set up Confluence, compare the database name from step 3, with the database name configured in the hibernate.connection.url property in your <home-directory>/confluence.cfg.xml file. 

      <property name="hibernate.connection.url">jdbc:jtds:sqlserver://{host}:{port}/{database_name}</property>
    2. If you configured the database with a JNDI datasource when you set up Confluence (assuming you followed this documentation page for JNDI datasource configuration), compare the database name from step 3, with the database name in the url attribute, located in the JNDI Datasource configuration in your <installation-directory>/conf/server.xml file.

      <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
               username="yourDatabaseUser"
               password="yourDatabasePassword"
               driverClassName="net.sourceforge.jtds.jdbc.Driver"
               url="jdbc:jtds:sqlserver://{host}:{port}/{database_name}"
               maxTotal="60"
               maxIdle="20"
               validationQuery="select 1" />
  4. Update the database name so that it matches the name of the database from the SQL query in step 3 (note it is case sensitive)
  5. Confluence を起動します。



最終更新日 2019 年 8 月 27 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.