Upgrading Confluence from 3.4.x to 3.5.x or never will throw an error - Bad SQL Grammar Nested Exception Invalid Object Name 'cwd_application'

お困りですか?

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

コミュニティに質問

症状

After upgrading Confluence from 3.4.x or an older version to 3.5.x or a newer version, the following error appears.

org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: 
Unable to perform find; bad SQL grammar []; nested exception is 
java.sql.SQLException: Invalid object name 'cwd_application'.
    at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:107) 
caused by: java.sql.SQLException: Invalid object name 'cwd_application'.
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368) 

Additionally, if a user tries to log in, a similar error can occur but this time pointing to the CWD_USER table

原因

The CWD_* tables weren't created properly in the upgrade process.

In 3.5.x, new user management was introduced using Crowd architecture to manage users in Confluence and implementing user directories in order to facilitate user management and integration between applications.

There are some known causes for that:

  1. The database from an older version was imported directly into 3.5.x or newer Confluence version database and thus, the upgrade automated steps didn't run as expected.
  2. The build number (<confluence-home>/confluence.cfg.xml) from the current version of Confluence is incorrect and this won't trigger the upgrade steps.
  3. The primary keys on the database do not exist. Can occur more often in SQL server but could also happen in other databases.

Resolution for cause 1

  1. Confluence をシャットダウンします。
  2. Rollback Confluence to the previous version before the upgrade attempt. (Restore the database backup and home_folder backup)
  3. Proceed with the upgrade steps exactly as in the upgrade documentation.

Resolution for cause 2

  1. Rollback your database to a point pre-upgrade.
  2. Run this query to remove the rows of the extra buildnumbers:
    Note: Where ? is the CONFVERSIONIDof all extra buildnumbers.

    データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。


    DELETE FROM CONFVERSION WHERE CONFVERSIONID IN (?,?,...);
  3. Be sure that the correct buildnumber of your current Confluence version is set into your confluence.cfg.xml file, which is located at Confluence home.

  4. Try to proceed with the upgrade again.

Resolution for cause 3

  1. Confluence をシャットダウンします。
  2. Rollback Confluence to the previous version before the upgrade attempt. (Restore the database backup and home_folder backup)

  3. Create an XML backup and import it into a new Confluence instance with the same version.
  4. Proceed with the upgrade steps exactly as in the upgrade documentation.



最終更新日 2021 年 8 月 24 日

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

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