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

Error on schema endpoint query with schema properties excluded in manged.json

    XMLWordPrintable

    Details

    • Target Version/s:
    • Verified Version/s:
    • Story Points:
      0
    • Sprint:
      2020.05 - IDM, 2020.06 - IDM

      Description

      Start up IDM with the schema properties excluded ie:

      { 
          "objects" : [ 
              { 
                  "name" : "user"
              },
              {
                  "name" : "assignment"
              },
              {
                  "name" : "role"
              }
          ]
      }
      

      When we try to query the schema endpoint, we get a 500 internal server error 

      curl -u openidm-admin:openidm-admin http://localhost:8080/openidm/schema/?_queryFilter=true
      

      Stack Trace:

      SEVERE: RuntimeException caught - rootId:00c1370b-6c8d-4d89-898c-0300c0815aec-1772
      org.forgerock.json.JsonValueException: /objects/2/schema: Expecting a Map or List
      	at org.forgerock.json.JsonValue.put(JsonValue.java:1131)
      	at org.forgerock.openidm.schema.impl.SchemaServiceImpl.schemaToJson(SchemaServiceImpl.java:157)
      	at org.forgerock.openidm.schema.impl.SchemaServiceImpl.handleQuery(SchemaServiceImpl.java:137)
      	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.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:280)
      	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:299)
      	at org.forgerock.openidm.authz.DelegatedAdminFilter.filterQuery(DelegatedAdminFilter.java:279)
      	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:139)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:171)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterQuery(AuditFilter.java:139)
      	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.filter.QueryIdToQueryFilterTransformFilter.filterQuery(QueryIdToQueryFilterTransformFilter.java:191)
      	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.openidm.router.filter.PassthroughFilter.filterQuery(PassthroughFilter.java:66)
      	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$2.filterQuery(ResourceFilters.java:119)
      	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.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.http.RequestRunner.visitQueryRequest(RequestRunner.java:214)
      	at org.forgerock.json.resource.http.RequestRunner.visitQueryRequest(RequestRunner.java:85)
      	at org.forgerock.json.resource.Requests$QueryRequestImpl.accept(Requests.java:444)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:137)
      	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.doQuery(HttpAdapter.java:506)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:315)
      	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:145)
      	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:261)
      	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 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	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.$Proxy63.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 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	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.$Proxy54.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.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)
      

       

        Attachments

          Activity

            People

            Assignee:
            brmiller Brendan Miller
            Reporter:
            brayden.roth-white Brayden Roth-White
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: