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

query-all-ids not working anymore in multiple-passwords sample with JDBC repos

    Details

      Description

      Since this commit done for OPENIDM-10308 (Remove hardcoded list of query IDs for relationship query) query-all-ids is not working anymore in multiple-passwords sample.

      Steps to reproduce

      • follow multiple-passwords sample install/start
      • query all ids on managed users:
        curl --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin"  --request GET "http://localhost:8080/openidm/managed/user?_queryId=query-all-ids" |jq .
        {
          "code": 500,
          "reason": "Internal Server Error",
          "message": "DB reported failure executing query."
        }
        

      And here is what we get in the log

      Mar 20, 2018 9:03:55 AM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
      WARNING: Resource exception: 500 Internal Server Error: "DB reported failure executing query."
      org.forgerock.json.resource.InternalServerErrorException: DB reported failure executing query.
      	at org.forgerock.openidm.repo.jdbc.impl.GraphTableHandler.executeQueryStatement(GraphTableHandler.java:497)
      	at org.forgerock.openidm.repo.jdbc.impl.GraphTableHandler.prepareAndExecuteQuery(GraphTableHandler.java:330)
      	at org.forgerock.openidm.repo.jdbc.impl.GraphTableHandler.query(GraphTableHandler.java:310)
      	at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.handleQuery(JDBCRepoService.java:679)
      	at org.forgerock.json.resource.Router.handleQuery(Router.java:316)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterQuery$4(AuditFilter.java:137)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:169)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterQuery(AuditFilter.java:137)
      	at org.forgerock.openidm.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:93)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterQuery$4(ServletConnectionFactory.java:413)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:446)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterQuery(ServletConnectionFactory.java:413)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openidm.filter.PassthroughFilter.filterQuery(PassthroughFilter.java:66)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterQuery(MutableFilterDecorator.java:90)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterQuery(MutableFilterDecorator.java:90)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	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.queryAsync(ServletConnectionFactory.java:379)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.queryAsync(AbstractConnectionWrapper.java:185)
      	at org.forgerock.openidm.managed.augmentation.AugmentingIDMConnectionFactoryProxy$ConnectionRequestHandlerAdaptor.handleQuery(AugmentingIDMConnectionFactoryProxy.java:182)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
      	at org.forgerock.openidm.managed.augmentation.FieldAugmentationFilter.filterQuery(FieldAugmentationFilter.java:95)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	at org.forgerock.openidm.managed.augmentation.AugmentingIDMConnectionFactoryProxy$RequestHandlerConnectionAdaptor.queryAsync(AugmentingIDMConnectionFactoryProxy.java:252)
      	at org.forgerock.json.resource.AbstractAsynchronousConnection.query(AbstractAsynchronousConnection.java:72)
      	at org.forgerock.openidm.managed.ManagedObjectSet.queryCollection(ManagedObjectSet.java:1398)
      	at org.forgerock.json.resource.InterfaceCollectionHandler.handleQuery(InterfaceCollectionHandler.java:51)
      	at org.forgerock.json.resource.Router.handleQuery(Router.java:316)
      	at org.forgerock.openidm.managed.ManagedObjectService$ManagedObjectSetRequestHandler.handleQuery(ManagedObjectService.java:209)
      	at org.forgerock.json.resource.Router.handleQuery(Router.java:316)
      	at org.forgerock.openidm.managed.ManagedObjectService.handleQuery(ManagedObjectService.java:317)
      	at org.forgerock.json.resource.Router.handleQuery(Router.java:316)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:95)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:84)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openidm.filter.ScriptedFilter.lambda$filterQuery$6(ScriptedFilter.java:120)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:252)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:216)
      	at org.forgerock.openidm.filter.ScriptedFilter.filterRequest(ScriptedFilter.java:145)
      	at org.forgerock.openidm.filter.ScriptedFilter.filterQuery(ScriptedFilter.java:120)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterQuery$4(AuditFilter.java:137)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:169)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterQuery(AuditFilter.java:137)
      	at org.forgerock.openidm.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:93)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterQuery$4(ServletConnectionFactory.java:413)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:446)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterQuery(ServletConnectionFactory.java:413)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openidm.filter.PassthroughFilter.filterQuery(PassthroughFilter.java:66)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterQuery(MutableFilterDecorator.java:90)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterQuery(MutableFilterDecorator.java:90)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	at org.forgerock.openidm.filter.PassthroughFilter.filterQuery(PassthroughFilter.java:66)
      	at org.forgerock.openidm.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:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:246)
      	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.queryAsync(ServletConnectionFactory.java:379)
      	at org.forgerock.json.resource.http.RequestRunner.visitQueryRequest(RequestRunner.java:220)
      	at org.forgerock.json.resource.http.RequestRunner.visitQueryRequest(RequestRunner.java:82)
      	at org.forgerock.json.resource.Requests$QueryRequestImpl.accept(Requests.java:440)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:128)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:252)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:241)
      	at org.forgerock.json.resource.http.HttpAdapter.doRequest(HttpAdapter.java:711)
      	at org.forgerock.json.resource.http.HttpAdapter.doQuery(HttpAdapter.java:470)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:283)
      	at org.forgerock.http.handler.Handlers$HandlerDescribableAsDescribableHandler.handle(Handlers.java:146)
      	at org.forgerock.http.filter.OptionsFilter.filter(OptionsFilter.java:69)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      	at org.forgerock.http.routing.Router.handle(Router.java:100)
      	at org.forgerock.http.swagger.OpenApiRequestFilter.filter(OpenApiRequestFilter.java:63)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      	at org.forgerock.openidm.auth.ProfileEnhancementCheckFilter.filter(ProfileEnhancementCheckFilter.java:138)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      	at org.forgerock.openidm.auth.NumberOfLoginsFilter.filter(NumberOfLoginsFilter.java:68)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      	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:252)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:241)
      	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:84)
      	at org.forgerock.openidm.auth.AuthFilterWrapper.filter(AuthFilterWrapper.java:87)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      	at org.forgerock.http.filter.TransactionIdInboundFilter.filter(TransactionIdInboundFilter.java:75)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      	at org.forgerock.http.servlet.HttpFrameworkServlet.service(HttpFrameworkServlet.java:254)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      	at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:257)
      	at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:220)
      	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.forgerock.openidm.servletregistration.impl.ServletRegistrationSingleton$FilterProxy.invoke(ServletRegistrationSingleton.java:296)
      	at com.sun.proxy.$Proxy54.doFilter(Unknown Source)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83)
      	at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:365)
      	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.forgerock.openidm.servletregistration.impl.ServletRegistrationSingleton$FilterProxy.invoke(ServletRegistrationSingleton.java:296)
      	at com.sun.proxy.$Proxy54.doFilter(Unknown Source)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	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:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:276)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      	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.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      	at java.lang.Thread.run(Thread.java:745)
      

      Note:

      • this was tested to fail with MySQL and postgreSQL
      • this is working OK with embedded DJ

        Attachments

          Activity

            People

            • Assignee:
              ben.apple Ben Apple
              Reporter:
              laurent.bristiel Laurent Bristiel [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: