Attempting to Roll logs causes NullPointerException
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
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
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 JRASERVER-26192 - Attempting to Roll logs causes NPE 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.
Was this helpful?