Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-12516

Audit Log feature unable to load older logs and run into error

    XMLWordPrintable

    Details

      Description

      Issue Summary

      Upgrading Bitbucket Server ver7.4.0 with the new audio logging feature runs into NPE and unable to load audit log from previous Bitbucket Server versions.

      Steps to Reproduce

      1. Upgrade Bitbucket to version 7.4.0 from <= v6.10.x.
      2. Check the audit log - Administration > Audit log page

      Expected Results

      The audit log UI feature able to load the audit logging from all the versions.

      Actual Results

      The below exception is thrown in the atlassian-bitbucket.log file:

      2020-08-05 21:33:19,148 ERROR [http-nio-7990-exec-10] admin @6OXTD2x1293x60x0 pvs31i 0:0:0:0:0:0:0:1 "GET /rest/auditing/1.0/events HTTP/1.1" c.a.p.r.c.e.j.ThrowableExceptionMapper Uncaught exception thrown by REST service: null
      java.lang.NullPointerException: null
      	at java.util.Objects.requireNonNull(Objects.java:203)
      	at com.atlassian.audit.rest.model.AuditAttributeJson.<init>(AuditAttributeJson.java:31)
      	at com.atlassian.audit.rest.utils.AuditEntitySerializer.toJson(AuditEntitySerializer.java:82)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1556)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at com.atlassian.audit.rest.utils.AuditEntitySerializer.toJson(AuditEntitySerializer.java:75)
      	at com.atlassian.audit.rest.AuditRestResource.lambda$generateJsonResponse$1(AuditRestResource.java:283)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at com.atlassian.audit.rest.model.RestPage.<init>(RestPage.java:44)
      	at com.atlassian.audit.rest.model.AuditEntitiesResponseJson.<init>(AuditEntitiesResponseJson.java:25)
      	at com.atlassian.audit.rest.AuditRestResource.generateJsonResponse(AuditRestResource.java:282)
      	at com.atlassian.audit.rest.AuditRestResource.getAuditEvents(AuditRestResource.java:226)
      	at com.atlassian.audit.rest.validation.ValidationInterceptor.intercept(ValidationInterceptor.java:44)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24)
      	at com.atlassian.bitbucket.internal.xcode.web.XcodeUserAgentFilter.doFilter(XcodeUserAgentFilter.java:36)
      	at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:75)
      	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:48)
      	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
      	at com.atlassian.bitbucket.internal.ratelimit.servlet.filter.RateLimitFilter.doFilter(RateLimitFilter.java:75)
      	at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81)
      	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
      	at com.atlassian.stash.internal.web.auth.AuthorizationFailureInterceptor.doFilterInternal(AuthorizationFailureInterceptor.java:39)
      	at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:85)
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112)
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)
      	at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94)
      	at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67)
      	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
      	at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69)
      	at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109)
      	at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37)
      	at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:26)
      	at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:48)
      	at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42)
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90)
      	at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73)
      	at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84)
      	at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.lang.Thread.run(Thread.java:748)
      	... 256 frames trimmed
      

       

      Workaround

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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              bannamalai Baskar Annamalai (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: