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

sustaining/5.5.x: Update with PUT with MS-SQL repo is failing with resource exception

    Details

      Description

      Our tests on 5.5.x catch regression same asĀ OPENIDM-10580 for 6.0.0

      Here are the steps to reproduce (with MS SQL repo)

      1. Create user
        curl --header "If-None-Match: *" --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --data '{"userName": "RNpiZsfb", "telephoneNumber": "6669876987", "givenName": "rick", "description": "Just another user", "sn": "sutter", "mail": "rick@example.com", "password": "Th3Password"}' --request PUT "http://localhost:8080/openidm/managed/user/RNpiZsfb"
        
        Response Content:
        {"_id":"RNpiZsfb","_rev":"0","userName":"RNpiZsfb","telephoneNumber":"6669876987","givenName":"rick","description":"Just another user","sn":"sutter","mail":"rick@example.com","password":{"$crypto":{"type":"x-simple-encryption","value":{"cipher":"AES/CBC/PKCS5Padding","salt":"S+OHiLitVZP0KjGS7imI4Q==","data":"Nw2zRrZNHXal6LEtqmCTaw==","keySize":16,"iv":"Uc7mUC0wDcYuFZ3V0cPilg==","key":"openidm-sym-default","mac":"zigpOJywJ8Y2pN23RTcVNA=="}}},"accountStatus":"active","lastChanged":{"date":"2019-10-24T13:55:11.808Z"},"effectiveRoles":[],"effectiveAssignments":[]} 
      1. Update user with If-Match: *
        	curl --header "Content-Type: application/json" --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --header "If-Match: *" --data '{"userName": "rsutter", "telephoneNumber": "6669876987", "givenName": "rick", "description": "Just another user", "sn": "sutter", "mail": "new@mail.com", "password": "Th3Password"}' --request PUT "http://localhost:8080/openidm/managed/user/RNpiZsfb"
        
        Response Content:
        {"code":500,"reason":"Internal Server Error","message":"Updating object failed with unexpected failure: null"}
        

      IDM logs

      WARNING: Resource exception: 500 Internal Server Error: "Updating object failed with unexpected failure: null"
      org.forgerock.json.resource.InternalServerErrorException: Updating object failed with unexpected failure: null
              at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.update(JDBCRepoService.java:463)
              at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.handleUpdate(JDBCRepoService.java:394)
              at org.forgerock.json.resource.Router.handleUpdate(Router.java:344)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:115)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterUpdate$6(AuditFilter.java:148)
              at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:168)
              at org.forgerock.openidm.audit.filter.AuditFilter.filterUpdate(AuditFilter.java:148)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterUpdate$6(ServletConnectionFactory.java:412)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:428)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterUpdate(ServletConnectionFactory.java:412)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.json.resource.FilterChain.handleUpdate(FilterChain.java:258)
              at org.forgerock.json.resource.InternalConnection.updateAsync(InternalConnection.java:88)
              at org.forgerock.json.resource.AbstractAsynchronousConnection.update(AbstractAsynchronousConnection.java:100)
              at org.forgerock.json.resource.AbstractConnectionWrapper.update(AbstractConnectionWrapper.java:212)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$2$1.update(ServletConnectionFactory.java:285)
              at org.forgerock.json.resource.AbstractConnectionWrapper.update(AbstractConnectionWrapper.java:212)
              at org.forgerock.openidm.managed.ManagedObjectSet.update(ManagedObjectSet.java:624)
              at org.forgerock.openidm.managed.ManagedObjectSet.updateInstance(ManagedObjectSet.java:1067)
              at org.forgerock.json.resource.InterfaceCollectionInstance.handleUpdate(InterfaceCollectionInstance.java:64)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:115)
              at org.forgerock.json.resource.Resources$CollectionInstanceIdContextFilter.filterUpdate(Resources.java:526)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.json.resource.FilterChain.handleUpdate(FilterChain.java:258)
              at org.forgerock.json.resource.Router.handleUpdate(Router.java:344)
              at org.forgerock.openidm.managed.ManagedObjectService$ManagedObjectSetRequestHandler.handleUpdate(ManagedObjectService.java:221)
              at org.forgerock.json.resource.Router.handleUpdate(Router.java:344)
              at org.forgerock.openidm.managed.ManagedObjectService.handleUpdate(ManagedObjectService.java:353)
              at org.forgerock.json.resource.Router.handleUpdate(Router.java:344)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:115)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:104)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.filter.ScriptedFilter.lambda$filterUpdate$5(ScriptedFilter.java:110)
              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:142)
              at org.forgerock.openidm.filter.ScriptedFilter.filterUpdate(ScriptedFilter.java:110)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.filter.ScriptedFilter.lambda$filterUpdate$5(ScriptedFilter.java:110)
              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:142)
              at org.forgerock.openidm.filter.ScriptedFilter.filterUpdate(ScriptedFilter.java:110)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterUpdate$6(AuditFilter.java:148)
              at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:168)
              at org.forgerock.openidm.audit.filter.AuditFilter.filterUpdate(AuditFilter.java:148)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterUpdate$6(ServletConnectionFactory.java:412)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:428)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterUpdate(ServletConnectionFactory.java:412)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.filter.PassthroughFilter.filterUpdate(PassthroughFilter.java:78)
              at org.forgerock.openidm.filter.MutableFilterDecorator.filterUpdate(MutableFilterDecorator.java:102)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.openidm.servlet.internal.ResourceFilters$1.filterUpdate(ResourceFilters.java:85)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterUpdate(Filters.java:102)
              at org.forgerock.json.resource.FilterChain$Cursor.handleUpdate(FilterChain.java:113)
              at org.forgerock.json.resource.FilterChain.handleUpdate(FilterChain.java:258)
              at org.forgerock.json.resource.InternalConnection.updateAsync(InternalConnection.java:88)
              at org.forgerock.json.resource.AbstractConnectionWrapper.updateAsync(AbstractConnectionWrapper.java:221)
              at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$2$1.updateAsync(ServletConnectionFactory.java:293)
              at org.forgerock.json.resource.http.RequestRunner.visitUpdateRequest(RequestRunner.java:287)
              at org.forgerock.json.resource.http.RequestRunner.visitUpdateRequest(RequestRunner.java:82)
              at org.forgerock.json.resource.Requests$UpdateRequestImpl.accept(Requests.java:623)
              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:712)
              at org.forgerock.json.resource.http.HttpAdapter.doUpdate(HttpAdapter.java:659)
              at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:276)
              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.swagger.OpenApiRequestFilter.filter(OpenApiRequestFilter.java:62)
              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:82)
              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:261)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
              at org.forgerock.openidm.jetty.LargePayloadServletFilter.doFilter(LargePayloadServletFilter.java:64)
              at sun.reflect.GeneratedMethodAccessor101.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:294)
              at com.sun.proxy.$Proxy59.doFilter(Unknown Source)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
              at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:311)
              at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:265)
              at sun.reflect.GeneratedMethodAccessor101.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:294)
              at com.sun.proxy.$Proxy59.doFilter(Unknown Source)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
              at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
              at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
              at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
              at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:690)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at org.eclipse.jetty.server.Server.handle(Server.java:503)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
              at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NumberFormatException: null
              at java.lang.Integer.parseInt(Integer.java:542)
              at java.lang.Integer.parseInt(Integer.java:615)
              at org.forgerock.openidm.repo.jdbc.impl.MSSQLTableHandler.update(MSSQLTableHandler.java:86)
              at org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService.update(JDBCRepoService.java:430)
              ... 164 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                matthias.grabiak Matthias Grabiak
                Reporter:
                michal.orlik@profiq.cz Michal Orlik
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: