Details
-
Bug
-
Status: Closed (View Workflow)
-
Low
-
Resolution: Duplicate
-
8.11.0
-
None
-
None
-
8.11
-
Severity 3 - Minor
-
Description
Issue Summary
There are warnings being triggered on the latest Jira software version due to the `RequestCacheImpl` being used outside of a request thread by the `JMXInstrumentsLoggingService`. This will not work in the future, so we need to fix it.
Steps to Reproduce
- Install Jira Software v8.11
The below exception is thrown in the Atlassian-jira.log file:
2020-07-17 13:50:05,242+0530 JMXInstrumentsLoggingService STARTING INFO [atlassian-performance] Scheduling JMXINSTRUMENTS with poll interval of 60 seconds 2020-07-17 13:50:05,243+0530 JMXInstrumentsLoggingService STARTING INFO [atlassian-performance] all services started and healthy 2020-07-17 13:50:05,243+0530 JMXInstrumentsLoggingService RUNNING WARN [c.a.j.cache.request.RequestCacheImpl] Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtil for details. 2020-07-17 13:50:05,243+0530 JMXInstrumentsLoggingService RUNNING WARN [c.a.j.cache.request.RequestCacheImpl] From Jira 9.0 version creation/usage of RequestCacheImpl will throw the IllegalStateException. 2020-07-17 13:50:05,244+0530 JMXInstrumentsLoggingService RUNNING WARN [c.a.j.cache.request.RequestCacheImpl] Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtil for details. 2020-07-17 13:50:05,244+0530 JMXInstrumentsLoggingService RUNNING WARN [c.a.j.cache.request.RequestCacheImpl] From Jira 9.0 version creation/usage of RequestCacheImpl will throw the IllegalStateException. 2020-07-17 13:51:05,247+0530 JMXInstrumentsLoggingService RUNNING WARN [c.a.j.cache.request.RequestCacheImpl] Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtil for details.
Workaround
Tried workaround JSDSERVER-6897
set the package to ERROR (this setting will remain after a Jira restart)
- Edit the file <JIRA_INSTALLATION>/atlassian-jira/WEB-INF/classes/log4j.properties
- Add the 2 following lines at the end of the file and save it:
log4j.logger.com.atlassian.jira.cache.request.RequestCacheImpl = ERROR, filelog log4j.additivity.com.atlassian.jira.cache.request.RequestCacheImpl = false
- Restart the Jira application
Attachments
Issue Links
- duplicates
-
JRASERVER-71310 Logs of usage of RequestCache without context is flooding the log files
-
- Closed
-