NullPointerException while viewing workflow scheme with draft

お困りですか?

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

コミュニティに質問

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 navigating to the workflows in a particular JIRA project, you receive the following error message:

The JIRA server was contacted but has returned an error response. We are unsure of the result of this operation. 

The following appears in the JIRA log when visiting the Workflows from in Project view:

2015-10-16 10:53:29.064555500 2015-10-16 10:53:29,057 ajp-nio-127.0.0.104-8009-exec-538 ERROR sysadmin 653x144559x1 kpjvwu 46.243.25.78,165.254.226.97 /rest/projectconfig/latest/workflowscheme/SERV [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
2015-10-16 10:53:29.064558500 java.lang.NullPointerException
2015-10-16 10:53:29.064558500 at com.atlassian.jira.projectconfig.rest.WorkflowSchemeRestHelper$SimpleWorkflow.<init>(WorkflowSchemeRestHelper.java:399)
2015-10-16 10:53:29.064559500 at com.atlassian.jira.projectconfig.rest.WorkflowSchemeRestHelper$ResponseDataBuilder.addWorkflowData(WorkflowSchemeRestHelper.java:275)
2015-10-16 10:53:29.064571500 at com.atlassian.jira.projectconfig.rest.WorkflowSchemeRestHelper$ResponseDataBuilder.build(WorkflowSchemeRestHelper.java:182)
2015-10-16 10:53:29.064571500 at com.atlassian.jira.projectconfig.rest.project.WorkflowSchemeResource.generateSchemeData(WorkflowSchemeResource.java:173)
2015-10-16 10:53:29.064572500 at com.atlassian.jira.projectconfig.rest.project.WorkflowSchemeResource.getWorkflowSchemeInfo(WorkflowSchemeResource.java:82)
2015-10-16 10:53:29.064574500 ... 2 filtered
2015-10-16 10:53:29.064574500 at java.lang.reflect.Method.invoke(Method.java:497)
2015-10-16 10:53:29.064575500 ... 19 filtered
2015-10-16 10:53:29.064579500 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)
2015-10-16 10:53:29.064580500 ... 1 filtered
2015-10-16 10:53:29.064580500 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)
2015-10-16 10:53:29.064581500 ... 40 filtered
2015-10-16 10:53:29.064581500 at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65)
2015-10-16 10:53:29.064584500 ... 24 filtered
2015-10-16 10:53:29.064585500 at com.atlassian.jira.plugins.rest.HOT25715FixServletFilter.doFilter(HOT25715FixServletFilter.java:46)
2015-10-16 10:53:29.064585500 ... 52 filtered
2015-10-16 10:53:29.064586500 at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40)
2015-10-16 10:53:29.064586500 ... 88 filtered
2015-10-16 10:53:29.064586500 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2015-10-16 10:53:29.064589500 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2015-10-16 10:53:29.064590500 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2015-10-16 10:53:29.064591500 at java.lang.Thread.run(Thread.java:745)Diagnosis


Visiting Worfklow Schemes, find the scheme with a draft, will usually have a (warning) next to it, generates a second error, and this displays in the logs:

2015-10-16 10:58:16.519525500 2015-10-16 10:58:16,485 ajp-nio-127.0.0.104-8009-exec-550 ERROR sysadmin 658x145126x1 kpjvwu 46.243.25.78,165.254.226.97 /rest/globalconfig/latest/workflowschemeeditor/12201 [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
2015-10-16 10:58:16.519528500 java.lang.NullPointerException
2015-10-16 10:58:16.519528500 at com.atlassian.jira.projectconfig.rest.WorkflowSchemeRestHelper$ResponseDataBuilder.getMappings(WorkflowSchemeRestHelper.java:342)
2015-10-16 10:58:16.519544500 at com.atlassian.jira.projectconfig.rest.WorkflowSchemeRestHelper$ResponseDataBuilder.addWorkflowData(WorkflowSchemeRestHelper.java:300)
2015-10-16 10:58:16.519544500 at com.atlassian.jira.projectconfig.rest.WorkflowSchemeRestHelper$ResponseDataBuilder.build(WorkflowSchemeRestHelper.java:186)
2015-10-16 10:58:16.519545500 at com.atlassian.jira.projectconfig.rest.global.WorkflowSchemeEditorResource.getScheme(WorkflowSchemeEditorResource.java:78)
2015-10-16 10:58:16.519547500 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2015-10-16 10:58:16.519547500 ... 2 filtered
2015-10-16 10:58:16.519547500 at java.lang.reflect.Method.invoke(Method.java:497)
2015-10-16 10:58:16.519548500 ... 3 filtered
2015-10-16 10:58:16.519548500 at com.atlassian.jira.projectconfig.rest.interceptor.SecurityInterceptor.intercept(SecurityInterceptor.java:47)
2015-10-16 10:58:16.519557500 ... 15 filtered
2015-10-16 10:58:16.519558500 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)
2015-10-16 10:58:16.519558500 ... 1 filtered
2015-10-16 10:58:16.519558500 at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)
2015-10-16 10:58:16.519560500 ... 40 filtered
2015-10-16 10:58:16.519561500 at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65)
2015-10-16 10:58:16.519561500 ... 24 filtered
2015-10-16 10:58:16.519561500 at com.atlassian.jira.plugins.rest.HOT25715FixServletFilter.doFilter(HOT25715FixServletFilter.java:46)
2015-10-16 10:58:16.519562500 ... 52 filtered
2015-10-16 10:58:16.519562500 at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40)
2015-10-16 10:58:16.519564500 ... 88 filtered
2015-10-16 10:58:16.519564500 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2015-10-16 10:58:16.519564500 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2015-10-16 10:58:16.519565500 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
2015-10-16 10:58:16.519565500 at java.lang.Thread.run(Thread.java:745)


Diagnostic Steps

In the database, you'll see a draft Workflow Scheme, with no name or description:

jira=# select * from draftworkflowscheme;
  id   | name | description | workflow_scheme_id |     last_modified_date     | last_modified_user
-------+------+-------------+--------------------+----------------------------+--------------------
 10700 |      |             |              12201 | 2015-09-14 13:06:28.772+02 | admin
(1 row)

And in the entity table:

jira=# select * from draftworkflowschemeentity;
  id   | scheme |                   workflow                   | issuetype
-------+--------+----------------------------------------------+-----------
 10700 |  10700 | Agile Simplified Workflow for Project PROJ | 0
 10701 |  10700 | Agile Simplified Workflow for Project PROJ | 1
 10702 |  10700 | Agile Simplified Workflow for Project PROJ | 2
 10703 |  10700 | Agile Simplified Workflow for Project PROJ | 3
 10704 |  10700 | Agile Simplified Workflow for Project PROJ | 4
 10705 |  10700 | Agile Simplified Workflow for Project PROj | 5
 10706 |  10700 | Agile Simplified Workflow for Project PROJ | 10000
 10707 |  10700 | Agile Simplified Workflow for Project PROJ | 10002
 10708 |  10700 | Agile Simplified Workflow for Project PROJ | 10001
(9 rows)


原因

The cause is due to the drafts existing with a null name.

ソリューション

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

  1. Delete any drafts with a NULL value in the name column by running the following SQL commands against JIRA's database:

    delete from draftworkflowschemeentity where scheme IN (select id from draftworkflowscheme where name is NULL);
    delete from draftworkflowscheme where name is NULL;
  2. Jira を再起動します。



最終更新日: 2018 年 1 月 25 日

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

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