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

REST call to list the custom relationships of a managed user returns a NullPointerException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: Module - Repository DS
    • Environment:
    • Target Version/s:

      Description

       

      I have a custom schema with an “organization” managed object with a 2 way relationship to the user managed object. The relation is N->N : a user can managed multiple orgs and an org can be managed by multiple users. I hit the attached NullPointerException when I try to list the orgs managed by a user in the admin UI user view, by accessing the “managed orgs” tab (next to the Reports tab).

      I don’t get this error if I go to the Reports tab and click the reload Grid button for example. I use a fresh build : OpenIDM version “7.0.0-SNAPSHOT” (build: 20200803233553, revision: 3e22f4f) jenkins-OpenIDM-build-master-2099 anf the default embedded DS repo.The browser traces shows that IDM returns an error 500 on the following request issued when clicking on the “reload grid” button:

      https://idmhost/openidm/managed/user/6064503d-c54d-4a22-b88e-ae7ec67895fa/managedOrgs?_pageSize=50&_sortKeys=_id&_totalPagedResultsPolicy=ESTIMATE&_queryFilter=true&_fields=

       

      The stack trace is as follows:

       
      [425] août 04, 2020 4:10:52.813 PM org.forgerock.http.servlet.HttpFrameworkServlet lambda$service$1
      GRAVE: RuntimeException caught - rootId:ae3f667d-ef2b-44d8-8d12-1451723c8750-69029
      java.lang.NullPointerException
      at org.forgerock.openidm.repo.opendj.impl.ReferenceHandler.queryReference(ReferenceHandler.java:348)
      at org.forgerock.openidm.repo.opendj.impl.RelationshipTypeHandlerDecorator.handleQuery(RelationshipTypeHandlerDecorator.java:132)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:94)
      at org.forgerock.openidm.repo.opendj.impl.PopulateMissingEdgesFilter.filterQuery(PopulateMissingEdgesFilter.java:127)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.repo.opendj.impl.TransformRelationshipQuery.filterQuery(TransformRelationshipQuery.java:88)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.repo.opendj.impl.OpenDJConnectionContextFilter.lambda$filterQuery$5(OpenDJConnectionContextFilter.java:120)
      at org.forgerock.openidm.repo.opendj.impl.OpenDJConnectionContextFilter.lambda$withConnectionContext$0(OpenDJConnectionContextFilter.java:81)
      at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:112)
      at org.forgerock.openidm.repo.opendj.impl.OpenDJConnectionContextFilter.withConnectionContext(OpenDJConnectionContextFilter.java:77)
      at org.forgerock.openidm.repo.opendj.impl.OpenDJConnectionContextFilter.filterQuery(OpenDJConnectionContextFilter.java:119)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:249)
      at org.forgerock.openidm.repo.opendj.impl.OpenDJRepoService.lambda$handleQuery$10(OpenDJRepoService.java:233)
      at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:112)
      at org.forgerock.openidm.repo.opendj.impl.OpenDJRepoService.handleQuery(OpenDJRepoService.java:228)
      at org.forgerock.json.resource.Router.handleQuery(Router.java:317)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:94)
      at org.forgerock.json.resource.ResourceApiVersionRoutingFilter.filterQuery(ResourceApiVersionRoutingFilter.java:71)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:249)
      at org.forgerock.json.resource.Router.handleQuery(Router.java:317)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:94)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.relationship.RelationshipsFilter.filterQuery(RelationshipsFilter.java:146)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterQuery$4(AuditFilter.java:145)
      at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:177)
      at org.forgerock.openidm.audit.filter.AuditFilter.filterQuery(AuditFilter.java:145)
      at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterQuery(MutableFilterDecorator.java:90)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.servlet.internal.ResourceFilters$3.lambda$filterQuery$4(ResourceFilters.java:194)
      at org.forgerock.openidm.servlet.internal.ResourceFilters$3.handleRequestWithLogging(ResourceFilters.java:222)
      at org.forgerock.openidm.servlet.internal.ResourceFilters$3.filterQuery(ResourceFilters.java:194)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.router.filter.QueryIdToQueryFilterTransformFilter.filterQuery(QueryIdToQueryFilterTransformFilter.java:258)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.router.filter.PassthroughFilter.filterQuery(PassthroughFilter.java:66)
      at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterQuery(MutableFilterDecorator.java:90)
      at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterQuery(MutableFilterDecorator.java:90)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:249)
      at org.forgerock.json.resource.InternalConnection.queryAsync(InternalConnection.java:74)
      at org.forgerock.json.resource.AbstractConnectionWrapper.queryAsync(AbstractConnectionWrapper.java:185)
      at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.lambda$queryAsync$13(ServletConnectionFactory.java:341)
      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.queryAsync(ServletConnectionFactory.java:340)
      at org.forgerock.json.resource.AbstractConnectionWrapper.queryAsync(AbstractConnectionWrapper.java:185)
      at org.forgerock.openidm.relationship.AugmentingIDMConnectionFactoryProxy$ConnectionRequestHandlerAdaptor.handleQuery(AugmentingIDMConnectionFactoryProxy.java:197)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:94)
      at org.forgerock.openidm.relationship.impl.augmentation.NullArrayFilter.filterQuery(NullArrayFilter.java:111)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.relationship.impl.augmentation.FieldAugmentationFilter.filterQuery(FieldAugmentationFilter.java:172)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.relationship.impl.augmentation.EdgeFieldAugmentationFilter.filterQuery(EdgeFieldAugmentationFilter.java:224)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:249)
      at org.forgerock.openidm.relationship.AugmentingIDMConnectionFactoryProxy$RequestHandlerConnectionAdaptor.queryAsync(AugmentingIDMConnectionFactoryProxy.java:267)
      at org.forgerock.openidm.relationship.EdgeCollectionInternals.lambda$queryCollection$4(EdgeCollectionInternals.java:147)
      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.relationship.CollectionRelationshipProvider.queryCollection(CollectionRelationshipProvider.java:165)
      at org.forgerock.json.resource.InterfaceCollectionHandler.handleQuery(InterfaceCollectionHandler.java:55)
      at org.forgerock.json.resource.Router.handleQuery(Router.java:317)
      at org.forgerock.json.resource.Router.handleQuery(Router.java:317)
      at org.forgerock.openidm.managed.ManagedObjectService$ManagedObjectSetRequestHandler.handleQuery(ManagedObjectService.java:333)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:94)
      at org.forgerock.openidm.notification.NotificationFilter.filterQuery(NotificationFilter.java:205)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.notification.NotificationFilter.filterQuery(NotificationFilter.java:205)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:249)
      at org.forgerock.json.resource.Router.handleQuery(Router.java:317)
      at org.forgerock.openidm.managed.ManagedObjectService.handleQuery(ManagedObjectService.java:577)
      at org.forgerock.json.resource.Router.handleQuery(Router.java:317)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:94)
      at org.forgerock.openidm.selfservice.impl.HashKbaFilter.filterQuery(HashKbaFilter.java:133)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.ResourceApiVersionRoutingFilter.filterQuery(ResourceApiVersionRoutingFilter.java:71)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:249)
      at org.forgerock.json.resource.Router.handleQuery(Router.java:317)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:94)
      at org.forgerock.openidm.authz.DelegatedAdminFilter.lambda$filterQuery$6(DelegatedAdminFilter.java:284)
      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.filterQuery(DelegatedAdminFilter.java:283)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.authz.DelegatedAdminFilter.lambda$filterQuery$6(DelegatedAdminFilter.java:284)
      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.filterQuery(DelegatedAdminFilter.java:283)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterQuery$4(AuditFilter.java:145)
      at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:177)
      at org.forgerock.openidm.audit.filter.AuditFilter.filterQuery(AuditFilter.java:145)
      at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterQuery(MutableFilterDecorator.java:90)
      at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:92)
      at org.f...
       
       

        Attachments

        1. 99-repo-customSchema.ldif
          2 kB
        2. managed.json
          73 kB
        3. repo.ds.json
          18 kB

          Issue Links

            Activity

              People

              • Assignee:
                katie.gonzalez Katie Gonzalez
                Reporter:
                cgrosjean Cyril Grosjean
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: