Attempting to Roll logs causes NullPointerException
Symptoms
When using the Mark Logs functionality in Logging & Profiling, a NullPointerException is generated.
The following appears in the browser and the atlassian-jira.log
:
Cause:
java.lang.NullPointerException
Stack Trace: [hide]
java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at com.atlassian.jira.util.log.LogMarker.rolloverAsAppropropriate(LogMarker.java:80)
at com.atlassian.jira.util.log.LogMarker.rollover(LogMarker.java:73)
at com.atlassian.jira.util.log.LogMarker.rolloverAndMark(LogMarker.java:51)
at com.atlassian.jira.web.action.admin.ViewLogging.doMarkLogs(ViewLogging.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
at webwork.action.ActionSupport.invokeCommand(ActionSupport.java:433)
at webwork.action.ActionSupport.execute(ActionSupport.java:157)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:82)
Cause
This is a known bug in JIRA 4.4.3 which has been fixed in JIRA 5.1.1. Kindly refer to - JRA-26192Getting issue details... STATUS for further information.
Workaround
- Fill in the 'Optional Message'.
- Click on the 'Mark' button without 'Log Rollover'.
- Click on the 'Mark' button again with 'Log Rollover'.
Resolution
Upgrade JIRA to 5.1.1 or above.