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

Null pointer when querying running taskInstance after upgrading from 5.5.0 to 6.0.0.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 6.0.0.3
    • Fix Version/s: None
    • Component/s: Module - Workflow
    • Labels:
      None
    • Support Ticket IDs:

      Description

      When querying a specific taskInstance after upgrading from IDM 5.5.0 to 6.0.0.3, a 500 error is returned:

      GET https://localhost:8443/openidm/workflow/taskinstance/53
      
      {
          "code": 500,
          "reason": "Internal Server Error",
          "message": "Internal Server Error"
      }
      

      The full stack trace from the console is:

      [990] Jan 08, 2019 1:24:39.347 PM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
      WARNING: Resource exception: 500 Internal Server Error: "Internal Server Error"
      org.forgerock.json.resource.InternalServerErrorException: Internal Server Error
      	at org.forgerock.openidm.workflow.activiti.impl.TaskInstanceResource.readInstance(TaskInstanceResource.java:247)
      	at org.forgerock.json.resource.InterfaceCollectionInstance.handleRead(InterfaceCollectionInstance.java:58)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:105)
      	at org.forgerock.json.resource.Resources$CollectionInstanceIdContextFilter.filterRead(Resources.java:520)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      	at org.forgerock.json.resource.FilterChain.handleRead(FilterChain.java:252)
      	at org.forgerock.json.resource.Router.handleRead(Router.java:330)
      	at org.forgerock.json.resource.Router.handleRead(Router.java:330)
      	at org.forgerock.openidm.workflow.activiti.impl.WorkflowService.handleRead(WorkflowService.java:123)
      	at org.forgerock.json.resource.Router.handleRead(Router.java:330)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:105)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:94)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      	at org.forgerock.openidm.filter.ScriptedFilter.lambda$filterRead$4(ScriptedFilter.java:107)
      	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.filterRead(ScriptedFilter.java:107)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterRead$5(AuditFilter.java:143)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:169)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterRead(AuditFilter.java:143)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.lambda$filterRead$5(ServletConnectionFactory.java:419)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.handleRequestWithLogging(ServletConnectionFactory.java:446)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3.filterRead(ServletConnectionFactory.java:419)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      	at org.forgerock.openidm.filter.PassthroughFilter.filterRead(PassthroughFilter.java:72)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      	at org.forgerock.openidm.filter.PassthroughFilter.filterRead(PassthroughFilter.java:72)
      	at org.forgerock.openidm.filter.MutableFilterDecorator.filterRead(MutableFilterDecorator.java:96)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterRead(Filters.java:92)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleRead(FilterChain.java:103)
      	at org.forgerock.json.resource.FilterChain.handleRead(FilterChain.java:252)
      	at org.forgerock.json.resource.InternalConnection.readAsync(InternalConnection.java:81)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.readAsync(AbstractConnectionWrapper.java:203)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.readAsync(ServletConnectionFactory.java:298)
      	at org.forgerock.json.resource.http.RequestRunner.visitReadRequest(RequestRunner.java:279)
      	at org.forgerock.json.resource.http.RequestRunner.visitReadRequest(RequestRunner.java:82)
      	at org.forgerock.json.resource.Requests$ReadRequestImpl.accept(Requests.java:583)
      	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.doRead(HttpAdapter.java:368)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:273)
      	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.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: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.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.$Proxy63.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.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.$Proxy63.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: java.lang.NullPointerException
      	at org.forgerock.openidm.workflow.activiti.impl.TaskInstanceResource.readInstance(TaskInstanceResource.java:236)
      	... 115 more
      

      To Reproduce:

      1. Install IDM 5.5.0 w/ JDBC (I used MySQL)
      2. Copy the provisioning-with-workflow configuration to the base openidm folder:

      mkdir data
      mkdir workflow
      cp samples/provisioning-with-workflow/conf/provisioner.openicf-* conf/
      cp samples/provisioning-with-workflow/conf/sync.json conf/
      cp samples/provisioning-with-workflow/data/* data/
      cp samples/provisioning-with-workflow/workflow/* workflow/
      

      3. Start IDM
      4. Follow the provisioning-with-workflow sample to create both users
      5. Start the Chess workflow and assign it to any user (in my testing I started it three times and assigned one each to user1, manager1 and openidm-admin)
      6. Upgrade to IDM 6.0.0
      7. Upgrade to IDM 6.0.0.3
      8. Attempt to read the taskinstance endpoint when running 6.0.0.3

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mark.offutt Mark Offutt [X] (Inactive)
              Reporter:
              tom.wood Tom Wood
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: