Details
-
Bug
-
Resolution: Obsolete
-
Low
-
4.4, 4.4.5
-
None
-
4.04
-
Description
Problem:
When trying to retrieve particular status, it would return "Internal Server Error" from JIRA through REST api:
http://example.com:8080/rest/api/2.0.alpha1/status/1 http://example.com:8080/rest/api/latest/status/1
It only happens if the workflow scheme(which *All Unassigned Issue Types" not assigned to any workflow) associated to the first project(arrangement based on the prefix eg. 1Test or ABC). It doesn't happen when that custom workflow scheme assigned to other project in the list.
Error Message:
{"errorMessages":["Internal server error"],"errors":{}}
Stacktrace from the logs:
2013-01-03 17:26:10,844 TP-Processor3 ERROR xxxx 1046x446967x1 h6cqu1 xx.xx.xx.xx /rest/api/latest/status/1 [jira.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor4058.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke ... Caused by: java.lang.NullPointerException at com.atlassian.jira.bc.config.DefaultConstantsService.getWorkflows(DefaultConstantsService.java:153) at com.atlassian.jira.bc.config.DefaultConstantsService.getStatusById(DefaultConstantsService.java:77) at sun.reflect.GeneratedMethodAccessor4010.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) ...
Replication Step:
- Create a workflow scheme assigned one of the any issue type(eg. Bug or Improvement) except *All Unassigned Issue Types".
- Create a project with named 1TEST(so it would be at the first of the prject list)
- Associate the workflow scheme to the project 1TEST
- Run a rest command to query the status open:
curl http://example.com:8080/rest/api/latest/status/1
- It will returns Internal Server Error
Workaround
- Reassign any other workflow schemes where All Unassigned Issue Types are assigned to a workflow.
- Add All Unassigned Issue Types to the custom workflow schemes.
- Upgrade to JIRA 5.x