JIRA displays 'com.atlassian.cache.CacheException: java.lang.NullPointerException: consumer' when deleting Application Link

お困りですか?

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

コミュニティに質問

Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.

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 trying to delete an Application Link in JIRA, the link is unable to be deleted and JIRA displays a 'com.atlassian.cache.CacheException: java.lang.NullPointerException: consumer'. This will also cause the features of the Application Link to not function and the following appears in the atlassian-jira.log:

2015-07-22 07:35:16,315 ajp-nio-127.0.0.104-8009-exec-4 WARN user 455x61414x2 1ec9rm1 192.168.1.10 /secure/RapidBoard.jspa [com.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'com.atlassian.cache.CacheException: java.lang.NullPointerException: consumer'.

Diagnostic Steps

Run the following query and look for a difference in the consumer_key between rows. If there is a difference between consumer_key for rows with the same token_key (excluding the username part) you're likely affected by this issue.

select * from oauthconsumertoken;
 
  id   |          created           |                    token_key                     |              token               |           token_secret           | token_type |               consumer_key
-------+----------------------------+--------------------------------------------------+----------------------------------+----------------------------------+------------+-------------------------------------------
 10309 | 2015-07-01 19:35:59.842+00 | a5f05bf0-3feb-3479-b101-d5ac9e8ea56d:user1       | XIUnPN1Qc982jufnQypngok5IBWqoIWu | FM2lRWLrOHhXLdYwJtwwFI4SO3aftiQV | ACCESS     | jira:2225f1ed-e21b-4ada-a40e-3ad49c79d7b4
 10703 | 2015-08-04 19:03:09.688+00 | a5f05bf0-3feb-3479-b101-d5ac9e8ea56d:user2       | ZWrNaIKeQTc7NlSZKTwYqlTZpfm5cEh0 | LuIBzKD6ZmF2gPXZ2CFojBKJpb0HgYlV | ACCESS     | jira:0f5f4683-0376-418e-ba8b-28b621649018
(2 rows)

This is caused by a stale consumer key being used and can occur after a migration to a new instance of JIRA.

  1. Jira を停止します。
  2. Create a backup of the JIRA database
  3. Using the consumer_key from above, run the following query

    delete from oauthconsumertoken where consumer_key = 'jira:2225f1ed-e21b-4ada-a40e-3ad49c79d7b4';
  4. Jira を起動します。

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

Last modified on Mar 28, 2024

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

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