Broken Build Processor Inserts fail on SQL Server when no IDENTITY column defined

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 は除く

問題

When the Broken Build Processor is inserting responsible user information into the database, the inserts can fail because auto-increment ("IDENTITY") is not defined on certain columns in the related tables:

  • AO_7A45FB_AOTRACKING_ENTRY
  • AO_7A45FB_AOTRACKING_RESULT
  • AO_7A45FB_AOTRACKING_USER

atlassian-bamboo.log に次のメッセージが表示される

2017-03-16 14:23:45,742 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-1-thread-16] [ChainPluginSupportImpl] file:<bamboo-install>/atlassian-bamboo/WEB-INF/atlassian-bundled-plugins/atlassian-bamboo-plugin-brokenbuildtracker-<version>.jar, BrokenBuildPostProcessor: com.atlassian.bamboo.brokenbuildtracker.BrokenBuildPostProcessor: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:Microsoft SQL Server
	- version:12.00.4100
	- minor version:0
	- major version:12
Driver:
	- name:jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
	- version:1.3.1

java.sql.SQLException: Cannot insert the value NULL into column 'TRACKING_ID', table '<bamboo-db>.dbo.AO_7A45FB_AOTRACKING_ENTRY'; column does not allow nulls. INSERT fails.
com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:Microsoft SQL Server
	- version:12.00.4100
	- minor version:0
	- major version:12
Driver:
	- name:jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
	- version:1.3.1

java.sql.SQLException: Cannot insert the value NULL into column 'TRACKING_ID', table '<bamboo-db>.dbo.AO_7A45FB_AOTRACKING_ENTRY'; column does not allow nulls. INSERT fails.
...
Caused by: java.sql.SQLException: Cannot insert the value NULL into column 'TRACKING_ID', table '<bamboo-db>.dbo.AO_7A45FB_AOTRACKING_ENTRY'; column does not allow nulls. INSERT fails.
...

診断

環境

  • MS SQL Server

Diagnostic Steps

Please run the following commands on your database: 

  • sp_help '[dbo].[AO_7A45FB_AOTRACKING_RESULT]'
  • sp_help '[dbo].[AO_7A45FB_AOTRACKING_USER]'
  • sp_help '[dbo].[AO_7A45FB_AOTRACKING_ENTRY]'

     

Please check the output for the phrase No identity column defined. If that phrase exists, please continue reading for cause and resolution.

原因

Root cause is currently undefined, but the tables were not created with IDENTITY columns. Bamboo relies on these columns when inserting, for the auto-increment functionality.

ソリューション

Since these tables are created on Bamboo startup, please:

  1. Stop Bamboo
  2. Drop the following tables:
    • AO_7A45FB_AOTRACKING_ENTRY
    • AO_7A45FB_AOTRACKING_RESULT
    • AO_7A45FB_AOTRACKING_USER
  3. Start Bamboo

 

最終更新日 2017 年 4 月 11 日

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

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