Invalid use of RequestCache by thread: Xporter

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 10.3.22
    • Component/s: Data Center - Other
    • None
    • 10.03
    • 1
    • Severity 3 - Minor

      Issue Summary

      See JRASERVER-72963#comment-3059444 for more details.

      Note: There is a whole family of "Invalid use of RequestCache by thread..." issues, one per thread. Find the one you need or file a new one.

      Steps to Reproduce

      Exact steps are unknown. Start Jira and after some time this error might be logged.

      Expected Results

      RequestCache is used inside a context and no error is logged.

      Actual Results

      RequestCache is used outside of a context, which risks an incorrect cache behaviour.

      The following error appears in atlassian-jira.log file:

      [jira.cache.request.RequestCacheRecorderImpl]  Invalid use of RequestCache by thread/stack: Xporter-fieldmapper-0f1f422a32214f748a1b72cb094becf7--tfnn6. Incorrect usage of JIRA API. You can only create/use: RequestCacheImpl inside a context (request or Jira-Thread-Local). Check JiraThreadLocalUtil and http://go/j/JRASERVER-72963 for details. This message will be logged once per thread/stacktrace. This ERROR should be fixed on the caller side (check the stack-trace or thread-name) as it is causing inconsistent data.com.atlassian.jira.cache.request.RequestCacheRecorderImpl$StackCollector: Stack trace of invalid RequestCache usage	at com.atlassian.jira.cache.request.RequestCacheRecorderImpl$ExceptionPoint.errorLogOOCThreadUsage(RequestCacheRecorderImpl.java:56) ~[classes/:?]	at com.atlassian.jira.cache.request.RequestCacheRecorderImpl.recordRequestCacheOOCUsage(RequestCacheRecorderImpl.java:125) ~[classes/:?]	at com.atlassian.jira.cache.request.RequestCacheImpl.get(RequestCacheImpl.java:92) ~[classes/:?]	at com.atlassian.jira.config.feature.DefaultFeatureManager.getDarkFeatures(DefaultFeatureManager.java:183) ~[classes/:?]	at com.atlassian.jira.config.feature.DefaultFeatureManager.getDarkFeatures(DefaultFeatureManager.java:178) ~[classes/:?]	at com.atlassian.jira.config.DefaultStatusCategoryManager.isStatusAsLozengeEnabled(DefaultStatusCategoryManager.java:54) ~[classes/:?]	at com.atlassian.jira.issue.status.StatusImpl.getStatusCategory(StatusImpl.java:27) ~[classes/:?]	at com.atlassian.jira.issue.status.SimpleStatusImpl.<init>(SimpleStatusImpl.java:29) ~[classes/:?]	at com.atlassian.jira.issue.status.StatusImpl.getSimpleStatus(StatusImpl.java:49) ~[classes/:?]	at com.atlassian.jira.issue.status.Status$getSimpleStatus.call(Unknown Source) ~[?:?]	at GLOBAL_TicketAge.run(GLOBAL_TicketAge.groovy:15) ~[?:?]	at com.onresolve.scriptrunner.runner.RunScriptInvoker.run(RunScriptInvoker.java:10) ~[?:?]	at com.onresolve.scriptrunner.runner.RunScriptInvoker$run.call(Unknown Source) ~[?:?]	at com.onresolve.scriptrunner.runner.AbstractScriptRunner.runScriptWithRawBindings(AbstractScriptRunner.groovy:205) ~[?:?]	at jdk.internal.reflect.GeneratedMethodAccessor1224.invoke(Unknown Source) ~[?:?]	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]	at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43) ~[?:?]	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:198) ~[?:?]	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:62) ~[?:?]	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194) ~[?:?]	at com.onresolve.scriptrunner.runner.AbstractScriptRunner.runScript(AbstractScriptRunner.groovy:199) ~[?:?]	at com.onresolve.scriptrunner.runner.AbstractScriptRunner$runScript$6.callCurrent(Unknown Source) ~[?:?]	at com.onresolve.scriptrunner.runner.AbstractScriptRunner.runScriptAndGetContext(AbstractScriptRunner.groovy:225) ~[?:?]	at com.onresolve.scriptrunner.runner.AbstractScriptRunner$runScriptAndGetContext$3.callCurrent(Unknown Source) ~[?:?]	at com.onresolve.scriptrunner.runner.AbstractScriptRunner.runScriptAndGetContext(AbstractScriptRunner.groovy:310) ~[?:?]	at com.onresolve.scriptrunner.runner.AbstractScriptRunner$runScriptAndGetContext$2.callCurrent(Unknown Source) ~[?:?]	at com.onresolve.scriptrunner.runner.AbstractScriptRunner.runScript(AbstractScriptRunner.groovy:320) ~[?:?]	at com.onresolve.scriptrunner.runner.ScriptRunner$runScript$12.call(Unknown Source) ~[?:?]	at com.onresolve.scriptrunner.customfield.GroovyCustomField$_getValueFromIssue_closure4.doCall(GroovyCustomField.groovy:301) ~[?:?]	at com.onresolve.scriptrunner.customfield.GroovyCustomField$_getValueFromIssue_closure4.doCall(GroovyCustomField.groovy) ~[?:?]	at jdk.internal.reflect.GeneratedMethodAccessor1209.invoke(Unknown Source) ~[?:?]	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343) ~[?:?]	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328) ~[?:?]	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:280) ~[?:?]	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007) ~[?:?]	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) ~[?:?]	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130) ~[?:?]	at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl$_execute_closure1.doCall(DiagnosticsManagerImpl.groovy:397) ~[?:?]	at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl$_execute_closure1.doCall(DiagnosticsManagerImpl.groovy) ~[?:?]	at jdk.internal.reflect.GeneratedMethodAccessor1208.invoke(Unknown Source) ~[?:?]	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343) ~[?:?]	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328) ~[?:?]	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:280) ~[?:?]	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007) ~[?:?]	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39) ~[?:?]	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130) ~[?:?]	at com.onresolve.scriptrunner.runner.ScriptExecutionRecorder.withRecording(ScriptExecutionRecorder.groovy:13) ~[?:?]	at com.onresolve.scriptrunner.runner.ScriptExecutionRecorder$withRecording.call(Unknown Source) ~[?:?]	at com.onresolve.scriptrunner.runner.diag.DiagnosticsManagerImpl$DiagnosticsExecutionHandlerImpl.execute(DiagnosticsManagerImpl.groovy:394) ~[?:?]	at com.onresolve.scriptrunner.runner.diag.DiagnosticsExecutionHandler$execute$3.call(Unknown Source) ~[?:?]	at com.onresolve.scriptrunner.customfield.GroovyCustomField.getValueFromIssue(GroovyCustomField.groovy:354) ~[?:?]	at com.atlassian.jira.issue.fields.ImmutableCustomField.getValue(ImmutableCustomField.java:355) ~[classes/:?]	at com.atlassian.jira.issue.DocumentIssueImpl.getCustomFieldValue(DocumentIssueImpl.java:366) ~[classes/:?]	at com.xpandit.jiraxporter.mapping.e.a(Unknown Source) ~[jiraxporter-7.3.2-j10_1788501221306.jar:?]	at com.xpandit.jiraxporter.manager.impl.XporterFieldRetrieverImpl.lambda$getFieldRetriever$152(Unknown Source) ~[jiraxporter-7.3.2-j10_1788501221306.jar:?]	at com.xpandit.jiraxporter.mapping.c.a(Unknown Source) ~[jiraxporter-7.3.2-j10_1788501221306.jar:?]	at java.lang.Iterable.forEach(Unknown Source) ~[?:?]	at com.xpandit.jiraxporter.mapping.c.b(Unknown Source) ~[jiraxporter-7.3.2-j10_1788501221306.jar:?]	at com.xpandit.jiraxporter.mapping.c.a(Unknown Source) ~[jiraxporter-7.3.2-j10_1788501221306.jar:?]	at com.xpandit.jiraxporter.mapping.b.a(Unknown Source) ~[jiraxporter-7.3.2-j10_1788501221306.jar:?]	at java.lang.Iterable.forEach(Unknown Source) [?:?]	at com.xpandit.jiraxporter.mapping.b.a(Unknown Source) [jiraxporter-7.3.2-j10_1788501221306.jar:?]	at com.xpandit.jiraxporter.mapping.b.call(Unknown Source) [jiraxporter-7.3.2-j10_1788501221306.jar:?]	at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]	at java.lang.Thread.run(Unknown Source) [?:?] 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Unassigned
              Reporter:
              Ankit Pruthi
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: