Gatekeeper UserCache.finish method is throwing NullPointerException in log

XMLWordPrintable

    • 8
    • Severity 2 - Major
    • 4

      Issue Summary

      The user upgraded Confluence 5.7.1 to v7.4.1 as suggested by official upgrade guide https://confluence.atlassian.com/doc/upgrading-confluence-manually-255363437.html

      After the upgrade, there was `Failed to initialize evaluator cache` error in log. It's unclear if the issue is caused by upgrade or something else. The risk is that the cache is in a stale state and the user will see the wrong info on the Who Can View dialog.

      Steps to Reproduce

      1. not clear yet

      Expected Results

      No errors in log

      Actual Results

      The below exception is thrown in the xxxxxxx.log file:

      2020-06-30 16:18:07,725 ERROR [perm-delta-cache-receiver] [gatekeeper.evaluator.cache.CacheUpdateReceiver] error Failed to initialize evaluator cache
      java.lang.NullPointerException
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.UserCache.finish(UserCache.java:178)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheImpl.finish(EvaluatorCacheImpl.java:169)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheImpl.<init>(EvaluatorCacheImpl.java:85)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheFactoryImpl.lambda$createInstance$0(EvaluatorCacheFactoryImpl.java:38)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
      	at com.atlassian.sal.spring.component.SpringHostContextAccessor.lambda$doInTransaction$0(SpringHostContextAccessor.java:70)
      	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
      	at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.access$001(ConfluenceSpringHostContextAccessor.java:21)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.lambda$doInTransaction$3(ConfluenceSpringHostContextAccessor.java:72)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
      	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
      	at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.doInTransaction(ConfluenceSpringHostContextAccessor.java:72)
      	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
      	at sun.reflect.GeneratedMethodAccessor254.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
      	at com.sun.proxy.$Proxy202.execute(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
      	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
      	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
      	at com.sun.proxy.$Proxy2571.execute(Unknown Source)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.EvaluatorCacheFactoryImpl.createInstance(EvaluatorCacheFactoryImpl.java:36)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.CacheUpdateReceiver.initCache(CacheUpdateReceiver.java:85)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.CacheUpdateReceiver.processAnyEvents(CacheUpdateReceiver.java:113)
      	at com.atlassian.confluence.plugins.gatekeeper.evaluator.cache.CacheUpdateReceiver.run(CacheUpdateReceiver.java:98)
      	at java.lang.Thread.run(Thread.java:748)
      

      Workaround

      A possible workaround is to disable and re-enable the Gatekeeper add-on so that the cache can be re-initialized.

            Assignee:
            Unassigned
            Reporter:
            Zac Xu
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: