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

NullPointerException within Flowable when attempting to complete a taskInstance

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a defect
    • Affects Version/s: 7.1.0
    • Fix Version/s: None
    • Component/s: Module - Workflow
    • Labels:
    • Target Version/s:
    • Story Points:
      3
    • Sprint:
      IDM - 2021.2, IDM - 2021.3

      Description

      Attached the fileĀ managedUserApproval.bar

      Reproduction notes:

      # Workflow sync-asynchronous sample
      #     https://backstage.forgerock.com/docs/idm/6.5/samples-guide/#chap-sync-asynchronous
      
      # replace the managedUserApproval.bar BAR file in directory below
      open openidm/samples/sync-asynchronous/workflow/
      
      ./openidm/startup.sh -p openidm/samples/sync-asynchronous jpda
      
      curl \
       --header "X-OpenIDM-Username: openidm-admin" \
       --header "X-OpenIDM-Password: openidm-admin" \
       --header "Content-Type: application/json" \
       --request POST \
       --data '{
       "userName": "async.admin",
       "givenName": "async",
       "sn" : "admin",
       "password" : "Passw0rd",
       "displayName" : "async admin",
       "mail" : "async.admin@example.com",
       "authzRoles": [
          {"_ref": "internal/role/openidm-admin"},
          {"_ref": "internal/role/openidm-authorized"}
       ],
       "_id" : "asyncadmin"
       }' \
       "http://localhost:8080/openidm/managed/user?_action=create" | jq
       
      curl \
       --header "X-OpenIDM-Username: openidm-admin" \
       --header "X-OpenIDM-Password: openidm-admin" \
       --request POST \
       "http://localhost:8080/openidm/recon?_action=recon&mapping=systemCsvfileAccounts_managedUser" | jq
       
       curl \
       --header "X-OpenIDM-Username: openidm-admin" \
       --header "X-OpenIDM-Password: openidm-admin" \
       --request GET \
       "http://localhost:8080/openidm/workflow/taskinstance?_queryId=query-all-ids" | jq
       
      curl \
       --header "X-OpenIDM-Username: async.admin" \
       --header "X-OpenIDM-Password: Passw0rd" \
       --header "Content-Type: application/json" \
       --request POST \
       --data '{"requestApproved": "true"}' \
       "http://localhost:8080/openidm/workflow/taskinstance/34?_action=complete" | jq
      

      Stacktrace:

      [241] Jan. 07, 2021 11:33:54.116 A.M. org.forgerock.openidm.servlet.internal.ResourceFilters$3 lambda$handleRequestWithLogging$8
      WARNING: Resource exception: 500 Internal Server Error: "Exception while invoking TaskListener: Exception while invoking TaskListener: null"
      org.forgerock.json.resource.InternalServerErrorException: Exception while invoking TaskListener: Exception while invoking TaskListener: null
      	at org.forgerock.openidm.workflow.activiti.impl.ActivitiUtil.toResourceException(ActivitiUtil.java:128)
      	at org.forgerock.openidm.workflow.activiti.impl.TaskInstanceResource.actionInstance(TaskInstanceResource.java:242)
      	at org.forgerock.json.resource.InterfaceCollectionInstance.handleAction(InterfaceCollectionInstance.java:32)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:54)
      	at org.forgerock.json.resource.Resources$CollectionInstanceIdContextFilter.filterAction(Resources.java:526)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.json.resource.FilterChain.handleAction(FilterChain.java:225)
      	at org.forgerock.json.resource.Router.handleAction(Router.java:251)
      	at org.forgerock.json.resource.Router.handleAction(Router.java:251)
      	at org.forgerock.openidm.workflow.activiti.impl.WorkflowService.handleAction(WorkflowService.java:121)
      	at org.forgerock.json.resource.Router.handleAction(Router.java:251)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:54)
      	at org.forgerock.json.resource.ResourceApiVersionRoutingFilter.filterAction(ResourceApiVersionRoutingFilter.java:39)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.json.resource.FilterChain.handleAction(FilterChain.java:225)
      	at org.forgerock.json.resource.Router.handleAction(Router.java:251)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:54)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.openidm.authz.DelegatedAdminFilter.lambda$filterAction$0(DelegatedAdminFilter.java:236)
      	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:303)
      	at org.forgerock.openidm.authz.DelegatedAdminFilter.filterAction(DelegatedAdminFilter.java:235)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.openidm.audit.filter.AuditFilter.lambda$filterAction$0(AuditFilter.java:121)
      	at org.forgerock.openidm.audit.filter.AuditFilter.logAuditAccessEntry(AuditFilter.java:177)
      	at org.forgerock.openidm.audit.filter.AuditFilter.filterAction(AuditFilter.java:121)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.lambda$filterAction$0(ResourceFilters.java:170)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.handleRequestWithLogging(ResourceFilters.java:222)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$3.filterAction(ResourceFilters.java:170)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.openidm.router.filter.QueryIdToQueryFilterTransformFilter.filterAction(QueryIdToQueryFilterTransformFilter.java:221)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.openidm.router.filter.PassthroughFilter.filterAction(PassthroughFilter.java:42)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.openidm.router.filter.PassthroughFilter.filterAction(PassthroughFilter.java:42)
      	at org.forgerock.openidm.router.filter.MutableFilterDecorator.filterAction(MutableFilterDecorator.java:66)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.openidm.servlet.internal.ResourceFilters$2.filterAction(ResourceFilters.java:95)
      	at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:42)
      	at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:52)
      	at org.forgerock.json.resource.FilterChain.handleAction(FilterChain.java:225)
      	at org.forgerock.json.resource.InternalConnection.actionAsync(InternalConnection.java:29)
      	at org.forgerock.json.resource.AbstractConnectionWrapper.actionAsync(AbstractConnectionWrapper.java:74)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.lambda$actionAsync$11(ServletConnectionFactory.java:330)
      	at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:112)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.time(ServletConnectionFactory.java:265)
      	at org.forgerock.openidm.servlet.internal.ServletConnectionFactory$InternalConnectionWrapper.actionAsync(ServletConnectionFactory.java:330)
      	at org.forgerock.json.resource.http.RequestRunner.visitActionRequest(RequestRunner.java:148)
      	at org.forgerock.json.resource.http.RequestRunner.visitActionRequest(RequestRunner.java:87)
      	at org.forgerock.json.resource.Requests$ActionRequestImpl.accept(Requests.java:181)
      	at org.forgerock.json.resource.http.RequestRunner.handleResult(RequestRunner.java:143)
      	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.doAction(HttpAdapter.java:653)
      	at org.forgerock.json.resource.http.HttpAdapter.handle(HttpAdapter.java:313)
      	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:157)
      	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:262)
      	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.$Proxy51.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.$Proxy50.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:717)
      	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.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135)
      	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)
      Caused by: org.flowable.common.engine.api.FlowableException: Exception while invoking TaskListener: Exception while invoking TaskListener: null
      	at org.flowable.engine.impl.bpmn.listener.ListenerNotificationHelper.executeTaskListeners(ListenerNotificationHelper.java:130)
      	at org.flowable.engine.impl.bpmn.listener.ListenerNotificationHelper.executeTaskListeners(ListenerNotificationHelper.java:109)
      	at org.flowable.engine.impl.util.TaskHelper.completeTask(TaskHelper.java:95)
      	at org.flowable.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:64)
      	at org.flowable.engine.impl.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:26)
      	at org.flowable.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:58)
      	at org.flowable.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:51)
      	at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:93)
      	at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72)
      	at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56)
      	at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25)
      	at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53)
      	at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72)
      	at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
      	at org.flowable.common.engine.impl.interceptor.RetryInterceptor.execute(RetryInterceptor.java:48)
      	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)
      	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51)
      	at org.flowable.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:223)
      	at org.forgerock.openidm.workflow.activiti.impl.TaskInstanceResource.actionInstance(TaskInstanceResource.java:230)
      	... 148 more
      Caused by: org.flowable.common.engine.api.FlowableException: Exception while invoking TaskListener: null
      	at org.flowable.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:127)
      	at org.flowable.engine.impl.delegate.invocation.TaskListenerInvocation.invoke(TaskListenerInvocation.java:35)
      	at org.flowable.engine.impl.delegate.invocation.DelegateInvocation.proceed(DelegateInvocation.java:35)
      	at org.flowable.engine.impl.delegate.invocation.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:26)
      	at org.flowable.engine.impl.bpmn.listener.ListenerNotificationHelper.executeTaskListeners(ListenerNotificationHelper.java:128)
      	... 166 more
      Caused by: java.lang.NullPointerException
      	at org.activiti.engine.impl.bpmn.listener.ScriptTaskListener.notify(ScriptTaskListener.java:48)
      	at org.flowable.engine.impl.delegate.invocation.TaskListenerInvocation.invoke(TaskListenerInvocation.java:35)
      	at org.flowable.engine.impl.delegate.invocation.DelegateInvocation.proceed(DelegateInvocation.java:35)
      	at org.flowable.engine.impl.delegate.invocation.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:26)
      	at org.flowable.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:125)
      	... 170 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cgdrake Chris Drake
              Reporter:
              cgdrake Chris Drake
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: