Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-993

DotNetConnectorServer - _pagedResultsCookie throws 500 on last page

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: framework-1.5.6.0
    • Fix Version/s: framework-1.5.6.0
    • Component/s: Connector Framework
    • Labels:
    • Environment:
      DotNetConnectorServer 1.5.6.0-SNAPSHOT,
      OpenIDM 6.5.0-SNAPSHOT (8cc76b7),
      MSPowershellConnector 1.4.5.0 (c0ce703a371)

      Description

      On last page we've got 500 Internal server Error

      All users

      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin"  --request GET "http://localhost:8080/openidm/system/ps/__ACCOUNT__/?_queryFilter=__NAME__%20ge%200"
      
      Response Content:
      {"result":[{"_id":"0","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"0","__NAME__":"0","attributeString":"foobar"},{"_id":"1","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"1","__NAME__":"1","attributeString":"foobar"},{"_id":"10","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"10","__NAME__":"10","attributeString":"foobar"},{"_id":"11","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"11","__NAME__":"11","attributeString":"foobar"},{"_id":"12","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"12","__NAME__":"12","attributeString":"foobar"},{"_id":"13","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"13","__NAME__":"13","attributeString":"foobar"},{"_id":"14","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"14","__NAME__":"14","attributeString":"foobar"},{"_id":"15","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"15","__NAME__":"15","attributeString":"foobar"},{"_id":"16","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"16","__NAME__":"16","attributeString":"foobar"},{"_id":"17","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"17","__NAME__":"17","attributeString":"foobar"},{"_id":"18","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"18","__NAME__":"18","attributeString":"foobar"},{"_id":"19","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"19","__NAME__":"19","attributeString":"foobar"},{"_id":"2","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"2","__NAME__":"2","attributeString":"foobar"},{"_id":"3","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"3","__NAME__":"3","attributeString":"foobar"},{"_id":"4","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"4","__NAME__":"4","attributeString":"foobar"},{"_id":"5","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"5","__NAME__":"5","attributeString":"foobar"},{"_id":"6","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"6","__NAME__":"6","attributeString":"foobar"},{"_id":"7","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"7","__NAME__":"7","attributeString":"foobar"},{"_id":"8","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"8","__NAME__":"8","attributeString":"foobar"},{"_id":"9","attributeInt":1,"attributeStringMultivalue":["foobar"],"uid":"9","__NAME__":"9","attributeString":"foobar"}],"resultCount":20,"pagedResultsCookie":null,"totalPagedResultsPolicy":"NONE","totalPagedResults":-1,"remainingPagedResults":-1}
      

      Paging through users

      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin"  --request GET "http://localhost:8080/openidm/system/ps/__ACCOUNT__/?_queryFilter=__NAME__%20ge%200&_pageSize=5"
      
      Response Content:
      {"result":[{"_id":"0","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"0","__NAME__":"0"},{"_id":"1","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"1","__NAME__":"1"},{"_id":"10","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"10","__NAME__":"10"},{"_id":"11","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"11","__NAME__":"11"},{"_id":"12","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"12","__NAME__":"12"}],"resultCount":5,"pagedResultsCookie":"12","totalPagedResultsPolicy":"NONE","totalPagedResults":-1,"remainingPagedResults":-1}
      
      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin"  --request GET "http://localhost:8080/openidm/system/ps/__ACCOUNT__/?_queryFilter=__NAME__%20ge%200&_pageSize=5&_pagedResultsCookie=12"
      
      Response Content:
      {"result":[{"_id":"13","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"13","__NAME__":"13"},{"_id":"14","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"14","__NAME__":"14"},{"_id":"15","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"15","__NAME__":"15"},{"_id":"16","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"16","__NAME__":"16"},{"_id":"17","attributeStringMultivalue":["foobar"],"attributeString":"foobar","attributeInt":1,"uid":"17","__NAME__":"17"}],"resultCount":5,"pagedResultsCookie":"17","totalPagedResultsPolicy":"NONE","totalPagedResults":-1,"remainingPagedResults":-1}
      
      curl --header "X-OpenIDM-Username: openidm-admin" --header "X-OpenIDM-Password: openidm-admin"  --request GET "http://localhost:8080/openidm/system/ps/__ACCOUNT__/?_queryFilter=__NAME__%20ge%200&_pageSize=50&_pagedResultsCookie=17"
      
      Response Content:
      {"code":500,"reason":"Internal Server Error","message":"Operation QUERY failed with ConnectorException on system object"}
      

      OpenIDM log

      [240] Lis 09, 2018 2:26:41.730 ODP. org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
      WARNING: Resource exception: 500 Internal Server Error: "Operation QUERY failed with ConnectorException on system object"
      org.forgerock.json.resource.InternalServerErrorException: Operation QUERY failed with ConnectorException on system object
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper.adaptConnectorException(ExceptionHelper.java:159)
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper.adaptRemoteWrappedException(ExceptionHelper.java:297)
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper.adaptConnectorException(ExceptionHelper.java:154)
      	at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleQuery(ObjectClassResourceProvider.java:519)
      	at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassRequestHandler.handleQuery(ObjectClassRequestHandler.java:132)
      	at org.forgerock.json.resource.Router.handleQuery(Router.java:317)
      	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.Filters$ConditionalFilter.filterQuery(Filters.java:82)
      	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.authz.DelegatedAdminFilter.lambda$filterQuery$9(DelegatedAdminFilter.java:237)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:260)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:224)
      	at org.forgerock.openidm.authz.DelegatedAdminFilter.filterQuery(DelegatedAdminFilter.java:237)
      	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:143)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:175)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterQuery(AuditFilter.java:143)
      	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:93)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterQuery$4(ServletConnectionFactory.java:403)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:436)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterQuery(ServletConnectionFactory.java:403)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleQuery(FilterChain.java:93)
      	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:93)
      	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:93)
      	at org.forgerock.json.resource.FilterChain.handleQuery(FilterChain.java:250)
      	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:370)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:112)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.time(ServletConnectionFactory.java:292)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.queryAsync(ServletConnectionFactory.java:369)
      	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:444)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:128)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:260)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:249)
      	at org.forgerock.json.resource.http.HttpAdapter.doRequest(HttpAdapter.java:713)
      	at org.forgerock.json.resource.http.HttpAdapter.doQuery(HttpAdapter.java:472)
      	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:148)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      	at org.forgerock.openidm.auth.LoginCountFilter.filter(LoginCountFilter.java:63)
      	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:260)
      	at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:249)
      	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:86)
      	at org.forgerock.http.handler.Handlers$1.handle(Handlers.java:53)
      	at org.forgerock.http.servlet.HttpFrameworkServlet.service(HttpFrameworkServlet.java:252)
      	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.UserAgentFilter.doFilter(UserAgentFilter.java:83)
      	at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:365)
      	at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
      	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:309)
      	at com.sun.proxy.$Proxy62.doFilter(Unknown Source)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:257)
      	at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:220)
      	at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
      	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:309)
      	at com.sun.proxy.$Proxy62.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:748)
      Caused by: org.identityconnectors.framework.common.exceptions.ConnectorException: Value cannot be null.
      Parameter name: value
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper$DotNetExceptionHelper.getConnectorException(ExceptionHelper.java:213)
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper.adaptRemoteWrappedException(ExceptionHelper.java:299)
      	... 111 more
      Caused by: org.forgerock.json.resource.InternalServerErrorException: Value cannot be null.
      Parameter name: value
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper$DotNetExceptionHelper$5.getMappedException(ExceptionHelper.java:200)
      	... 113 more
      Caused by: org.identityconnectors.framework.impl.api.remote.RemoteWrappedException: 
      	at org.identityconnectors.framework.impl.api.remote.RemoteWrappedException.getCause(RemoteWrappedException.java:152)
      	at org.identityconnectors.framework.impl.api.remote.RemoteWrappedException.getCause(RemoteWrappedException.java:57)
      	... 114 more
        

      DotNet logs

      No errors

        Attachments

          Activity

            People

            • Assignee:
              gael Gael Allioux
              Reporter:
              michal.orlik@profiq.cz Michal Orlik
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: