Migrating Confluence attachments storage from database to file system fails with InputStream cannot be null.

お困りですか?

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

コミュニティに質問


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

    

要約

Attempting to export the attachments from the database to the file system fails.

環境

Confluence server and Datacenter

診断

Confluence server had an option to store the attachment files in the database. In Confluence 5.5 it was deprecated and we provide an option to migrate the attachments from the database to the file system. This KB treats an issue with the migration process and is only applicable in this scenario.

The following error appears in the atlassian-confluence.log when attempting to migrate the attachments from the database to the file system:

ERROR [Long running task: Attachment data migration] [confluence.util.longrunning.AttachmentMigrationLongRunningTask] runInternal inputStream cannot be null
-- url: /wiki/admin/doattachmentmigration.action | referer: Confluence_base_URL/admin/doeditattachmentstorage.action | traceId: ada3fdd04c8e8490 | userName: admin| action: doattachmentmigration
java.lang.NullPointerException: inputStream cannot be null


原因

There are missing attachments in the attachmentdata table on the database. The migration process fails when it attempts to read the missing data.

ソリューション

Remove the missing rows using the steps below.

Always perform a full database backup before running any SQL commands.

  1. Confluence をシャットダウンします。

  2. Backup the database
  3. Run this SQL command to identify the NULL rows

    select attachmentdataid from attachmentdata where data is NULL;


  4. Run the command below to remove the NULL rows

    delete from attachmentdata where data is NULL;
  5. Confluence を再起動します。
  6. Attempt a new migration process.



最終更新日 2020 年 11 月 26 日

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

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