Mail Handler Fails due to Custom Field NOT Configured for Any Context

お困りですか?

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

コミュニティに質問

症状

Mail Handler fails to create issues or add comments. One or more of the following NullPointerException appears in the atlassian-jira-incoming-mail.log file:

2014-08-25 11:50:53,067 WARN [jira@jiraserver] atlassian-scheduler-quartz1.clustered_Worker-4 ServiceRunner    Systems Issue Email Handler Systems Issue Email Handler[10010]: Unable to create issue with message.
java.lang.NullPointerException
	at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType.getDefaultValue(MultiSelectCFType.java:205)
	at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType.getDefaultValue(MultiSelectCFType.java:83)
	at com.atlassian.jira.issue.fields.CustomFieldImpl.getDefaultValue(CustomFieldImpl.java:1248)
	...
 
2014-08-26 00:41:32,362 WARN [jira@jiraserver] atlassian-scheduler-quartz1.clustered_Worker-3 ServiceRunner Systems Issue Email Handler Systems Issue Email Handler[10010]: Unable to create issue with message.
java.lang.NullPointerException
	at com.atlassian.jira.issue.customfields.impl.SelectCFType.getDefaultValue(SelectCFType.java:244)
	at com.atlassian.jira.issue.customfields.impl.SelectCFType.getDefaultValue(SelectCFType.java:69)
	at com.atlassian.jira.issue.fields.CustomFieldImpl.getDefaultValue(CustomFieldImpl.java:1248)
	...
 
2014-09-05 15:04:27,246 atlassian-scheduler-quartz1.clustered_Worker-2 WARN ServiceRunner    Create Helpdesk Issue [atlassian.mail.incoming.mailfetcherservice] Create Helpdesk Issue[10030]: Unable to create issue with message.
java.lang.NullPointerException
    at com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType.getDefaultValue(AbstractMultiCFType.java:88)
    at com.atlassian.jira.issue.customfields.impl.AbstractMultiCFType.getDefaultValue(AbstractMultiCFType.java:39)
    at com.atlassian.jira.issue.fields.CustomFieldImpl.getDefaultValue(CustomFieldImpl.java:1248)
	...
 
2014-09-20 12:43:42,879 WARN [jira] atlassian-scheduler-quartz1.clustered_Worker-3 ServiceRunner    Create issues via email Create issues via email[10101]: Unable to create issue with message.
java.lang.NullPointerException
	at com.atlassian.jira.issue.customfields.impl.LabelsCFType.getDefaultValue(LabelsCFType.java:147)
	at com.atlassian.jira.issue.customfields.impl.LabelsCFType.getDefaultValue(LabelsCFType.java:73)
	at com.atlassian.jira.issue.fields.CustomFieldImpl.getDefaultValue(CustomFieldImpl.java:1248)

診断

  • Using JIRA older than 6.3.5
  • One or more custom fields have at least ONE scheme not configured for any contexts
  • If the custom field has only one scheme, it can be easily noticed from Custom Fields page:
  • If the custom field has more than one scheme and at least one of them is configured for a context, then this context will be shown on Custom Fields page, which makes it harder to find in case there're lots of custom fields. JIRA Admin will have to manually Configure every custom field to find this out (refer to Workaround for a better way):

原因

This is caused by a Bug as reported in  JRA-39687 - Getting issue details... STATUS

回避策

  1. Run this SQL query to find all the custom fields which have at least ONE scheme not configured for any contexts:

    select * from fieldconfigscheme where id not in (select fieldconfigscheme from configurationcontext) and fieldid like 'customfield_%';

    The custom field IDs can be seen under FIELDID column, e.g. customfield_11500customfield_12000


  2. Run this SQL query to find the custom field names (using the above IDs):

    select id, cfname from customfield where id in (11500, 12000);
  3. Go to Custom Fields page, Configure each of the above custom fields and delete the problematic schemes or modify them to use proper contexts

ソリューション

tip/resting Created with Sketch.

Upgrade JIRA to 6.3.5 or above, where the Bug is Fixed.

最終更新日 2018 年 11 月 6 日

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

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