Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-15231

IDM 6.5-7.0: ReconciliationStatistic deserialization causes NPE

    Details

    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      1
    • Sprint:
      2020.10 - IDM

      Description

      When testing IDM 6.5-7.0 upgrade (use test procedure in OPENIDM-14550), for workflow data, I found that ReconciliationStatistic deserialization causes a NullPointerException when you first login to IDM admin. This is happening, because the workflow sample performs a recon, and fields that were added to ReconciliationStatistic are left as null after deserializing from the repo.

      It's unfortunate that we serialize this data to the repo using Java serialization, but this issue needs to be fixed before release.

      The stacktrace is from the mappingdetails.js script, so doesn't have clear info:

      [176] Jul 29, 2020 4:58:51.427 AM org.forgerock.openidm.servlet.internal.ResourceFilters$3 lambda$handleRequestWithLogging$8
      WARNING: Resource exception: 500 Internal Server Error: "Internal Server Error"
      org.forgerock.json.resource.InternalServerErrorException: Internal Server Error
      	at org.forgerock.json.resource.ResourceException.newResourceException(ResourceException.java:237)
      	at org.forgerock.openidm.script.ScriptThrownException.toResourceException(ScriptThrownException.java:157)
      	at org.forgerock.openidm.script.handler.ScriptedRequestHandler.convertScriptException(ScriptedRequestHandler.java:375)
      	at org.forgerock.openidm.script.handler.ScriptedRequestHandler.evaluate(ScriptedRequestHandler.java:421)
      	at org.forgerock.openidm.script.handler.ScriptedRequestHandler.lambda$handleRead$10(ScriptedRequestHandler.java:353)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:112)
      	at org.forgerock.openidm.script.handler.ScriptedRequestHandler.handleRead(ScriptedRequestHandler.java:352)
      	at org.forgerock.json.resource.Router.handleRead(Router.java:331)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:104)
      	at org.forgerock.json.resource.ResourceApiVersionRoutingFilter.filterRead(ResourceApiVersionRoutingFilter.java:79)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.FilterChain.handleRead(FilterChain.java:255)
      	at org.forgerock.json.resource.Router.handleRead(Router.java:331)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:104)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.authz.DelegatedAdminFilter.lambda$filterRead$4(DelegatedAdminFilter.java:268)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:263)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:227)
      	at org.forgerock.openidm.authz.DelegatedAdminFilter.filterRequest(DelegatedAdminFilter.java:303)
      	at org.forgerock.openidm.authz.DelegatedAdminFilter.filterRead(DelegatedAdminFilter.java:267)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterRead$5(AuditFilter.java:151)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:177)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterRead(AuditFilter.java:151)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.lambda$filterRead$5(ResourceFilters.java:200)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.handleRequestWithLogging(ResourceFilters.java:222)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.filterRead(ResourceFilters.java:200)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.router.filter.QueryIdToQueryFilterTransformFilter.filterRead(QueryIdToQueryFilterTransformFilter.java:245)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.router.filter.PassthroughFilter.filterRead(PassthroughFilter.java:72)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.router.filter.PassthroughFilter.filterRead(PassthroughFilter.java:72)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$2.filterRead(ResourceFilters.java:125)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:102)
      	at org.forgerock.json.resource.FilterChain.handleRead(FilterChain.java:255)
      	at org.forgerock.json.resource.InternalConnection.readAsync(InternalConnection.java:81)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.readAsync(AbstractConnectionWrapper.java:203)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.lambda$readAsync$3(ServletConnectionFactory.java:286)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:112)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.time(ServletConnectionFactory.java:263)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.readAsync(ServletConnectionFactory.java:286)
      	at org.forgerock.json.resource.http.RequestRunner.visitReadRequest(RequestRunner.java:279)
      	at org.forgerock.json.resource.http.RequestRunner.visitReadRequest(RequestRunner.java:87)
      	at org.forgerock.json.resource.Requests$ReadRequestImpl.accept(Requests.java:587)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:143)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:263)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:252)
      	at org.forgerock.json.resource.http.HttpAdapter.doRequest(HttpAdapter.java:747)
      	at org.forgerock.json.resource.http.HttpAdapter.doRead(HttpAdapter.java:402)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:305)
      	at org.forgerock.http.handler.Handlers$HandlerDescribableAsDescribableHandler.handle(Handlers.java:147)
      	at org.forgerock.http.filter.OptionsFilter.filter(OptionsFilter.java:69)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:54)
      	at org.forgerock.openidm.auth.ProfileEnhancementCheckFilter.filter(ProfileEnhancementCheckFilter.java:157)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:54)
      	at org.forgerock.openidm.auth.LoginCountFilter.filter(LoginCountFilter.java:75)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:54)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.grantAccess(AuthenticationFramework.java:188)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.lambda$onValidateRequestSuccess$1(AuthenticationFramework.java:181)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:263)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:252)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.validateRequest(AuthenticationFramework.java:144)
      	at org.forgerock.caf.authentication.framework.AuthenticationFramework.processMessage(AuthenticationFramework.java:134)
      	at org.forgerock.caf.authentication.framework.AuthenticationFilter.filter(AuthenticationFilter.java:85)
      	at org.forgerock.openidm.auth.AuthFilterWrapper.filter(AuthFilterWrapper.java:85)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:54)
      	at org.forgerock.http.swagger.OpenApiRequestFilter.filter(OpenApiRequestFilter.java:63)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:54)
      	at org.forgerock.http.routing.Router.handle(Router.java:100)
      	at org.forgerock.http.filter.TransactionIdInboundFilter.filter(TransactionIdInboundFilter.java:86)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:54)
      	at org.forgerock.http.servlet.HttpFrameworkServlet.service(HttpFrameworkServlet.java:262)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1386)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
      	at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:310)
      	at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:264)
      	at jdk.internal.reflect.GeneratedMethodAccessor367.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.forgerock.openidm.servletregistration.impl.ServletRegistrationSingleton$FilterProxy.invoke(ServletRegistrationSingleton.java:327)
      	at com.sun.proxy.$Proxy65.doFilter(Unknown Source)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
      	at org.forgerock.openidm.jetty.LargePayloadServletFilter.doFilter(LargePayloadServletFilter.java:64)
      	at jdk.internal.reflect.GeneratedMethodAccessor367.invoke(Unknown Source)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.forgerock.openidm.servletregistration.impl.ServletRegistrationSingleton$FilterProxy.invoke(ServletRegistrationSingleton.java:327)
      	at com.sun.proxy.$Proxy57.doFilter(Unknown Source)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1607)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1297)
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:290)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1577)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1212)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
      	at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:767)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
      	at org.eclipse.jetty.server.Server.handle(Server.java:500)
      	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
      	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.forgerock.openidm.script.ScriptThrownException
      	at org.forgerock.openidm.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:842)
      	at org.forgerock.openidm.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:853)
      	at org.forgerock.openidm.script.handler.ScriptedRequestHandler.evaluate(ScriptedRequestHandler.java:448)
      	at org.forgerock.openidm.script.handler.ScriptedRequestHandler.evaluate(ScriptedRequestHandler.java:408)
      	... 141 more
      Caused by: java.lang.NullPointerException
      

      The exception happens when calls are made to:

          /**
           * Gets the count of existing target values that were equal to source target values.
           *
           * @return Number of unchanged targets
           */
          public int getTargetUnchanged() {
              return targetUnchanged.get();
          }
      
          /**
           * Gets the count of existing target values that were updated.
           *
           * @return Number of updated targets
           */
          public int getTargetUpdated() {
              return targetUpdated.get();
          }
      
          /**
           * Gets the count of existing target values that were deleted.
           *
           * @return Number of deleted targets
           */
          public int getTargetDeleted() {
              return targetDeleted.get();
          }
      

      because they are null when deserialized from a 6.5 database

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                travis.haagen Travis Haagen
                Reporter:
                travis.haagen Travis Haagen
                QA Assignee:
                Chris Drake
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: