Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-7955

Unable to submit human task output data (DocumentImpl) using REST API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.15.0.Final
    • 7.13.0.Final, 7.14.0.Final
    • Human Task Service
    • None
    • NEW
    • NEW
    • Hide

      Body:
      {
      "case-data" : { },
      "case-user-assignments" :

      { "owner" : "username", "manager" : "username", "supplier" : "username" }

      ,
      "case-group-assignments" :

      {"supplier" : "IT" }

      }

      Body:

      {
      "hwSpec_": {
      "org.jbpm.document.service.impl.DocumentImpl": {
      "identifier": "7f6e33aa-93ec-424c-ac75-f8be7fda",
      "name": "drools.png",
      "link": "",
      "size": 2729,
      "lastModified":

      { "java.util.Date": 1538165956000 }

      ,
      "content": "iVBORw0KGgoAAAANSUhEUgAAATYAAABiCAMAAADtCg/OAAAAw1BMVEX///9zc3PMKSsApt7yfQDmlJXyysvPNjjZX2D88vP22Njsr7DWUVPfent/f39AvOb55eWCc7qA0+/SREbq6uqKioqYmJjvvb34+Pjih4iQkJDpoqPcbG7c3Nz1nkDJycm3t7f5voDA6fft7e3Pz8/9/D838CdnZ2qqqq+vr6BgYH959D0lTDZ2dn4tnD717Dg3O7zhRD3rmD0jSD97+ChlsvBud3w+v32plD5xpDQ7/n6z6CQ2PHJwuGajcexqNQgseJX5+LEAAAJoUlEQVR4nO1d6WLaOBDGCcaEwyXlckxcO4UWQ0Pvu9227/9Ua9nI1jGSRoYmpPH3YzeEGWv0ZTQajWS11dKjk2HhzrP/jgySDXL0FsPuGQev684v7tusU8ZF/9o7gzFYNG4HYzRUcVag27lvC08Qo2HFT9ctcc2O2PH8vq08MVy4+zg27PfE73r9yg270rePGb1xTsq10pt6V5Q59y7tOm0sCtL0Qb8/2DtcM6sWyKPa2Bzw54VPjpuBSpCzNkD5UBEBvYa3PWtDpHDPa3jL0c/DGlr8YoD3zX8YI8+ShYI3PM//Jkg261mtmwreHveKYU4osMz98/g2/jv2PBCM6wy4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DMS3+xhz4HaWZRbOn0HQ6ND+QkNPsQWDEEWfpjy+t43Aexl0tK2qNHIHKUE6gbrIT4OZI274mUXlJqdgsYN6mzFxI+i5LuLSJxd8M1BNW8QcPEtAJbAZWs2W32Wg6YG0vYwQlXeufGjzJZL0NMjvOzK+zzwG0g8lbUvuXKi4z6GjTXlCocxGzYcZZFFowy+V5xKqiCof7a8D1HtcH357V6Atf3lok/JniaTdIR1t1XkYnozyXEdSSxSgzfFjgTiaCvqoIrm7v4BSe8nFGL4YyjFD3kXW0gaevpqUv+RGJF4Uoi3Lz9gTKAF0UkmLfnFfrOb+SYWzIWgDbNDTtqxmEuCs36SeKEwbIXwTkUOBUVzVQSxeEesM9PcBKpzNSBtYLNXTpjtZKi6y0aJK2mT4Vi/5LzzNjVnKu0P0pCnOxBtoa0UqMuQjz1hRC9oszzeMBmeq2wd6yluRdKRNxZCr6oOEJVitdkLAD5CiYpMJqOWAp6BMyK/5vJbpye82gq8lUHIWJuqilZG2bJKUvUj1OgdKVGqSeYuERa07EYpLZcUAl9+vqLg6RDJ4O52tTdenIGjLusVnMbqXhxCiUJNRKjAnHe3EIj8s6PEBrjeod0vewZhs0pB0zA/XxlfV8KK8XpzOpsRb/ek6sT/TUCI/nMoN1LlX4yLLR4eOxzlcp8joHubtY3eJUUGUN1x0FlfFdeINaxgsxH+uo2ENBeaf7IBm1gYqjOjwPBs0rmaFXt913c5jvcCzQYMGDRo0aNCgQYPHgv8B0TueKisf7ysAAAAASUVORK5CYII=",
      "attributes":

      { "_UPDATED_": "false" }

      }
      },
      "supplierComment_":"Supplier comment"
      }

      Response: is 201 OK created

      Any document can be used by doing a base64 encoding will give the same result

      • Now complete the next human task (Manager approval) using the REST API:

      URL (PUT): http://localhost:8080/kie-server/services/rest/server/containers/itorders_1.0.0-SNAPSHOT/tasks/2/states/completed?auto-progress=true

      Body:
      {
      "managerComment_": "Manager is happy with HW Spec",
      "approved_": true
      }

      If we send this over we get the error:

      10:27:01,775 ERROR [org.kie.server.remote.rest.jbpm.UserTaskResource] (default task-30) Unexpected error during processing java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException: java.lang.RuntimeException: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
      at org.jbpm.runtime.manager.impl.PerCaseRuntimeManager.disposeRuntimeEngine(PerCaseRuntimeManager.java:271)
      at org.jbpm.kie.services.impl.UserTaskServiceImpl.disposeRuntimeEngine(UserTaskServiceImpl.java:1179)
      at org.jbpm.kie.services.impl.UserTaskServiceImpl.completeAutoProgress(UserTaskServiceImpl.java:262)
      at org.kie.server.services.jbpm.UserTaskServiceBase.completeAutoProgress(UserTaskServiceBase.java:117)
      at org.kie.server.remote.rest.jbpm.UserTaskResource.complete(UserTaskResource.java:195)
      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:497)
      at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
      at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
      at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
      at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:406)
      at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:213)
      at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228)
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
      at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:65)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
      at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
      at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:330)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
      at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:137)
      at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadKieSession(KnowledgeStoreServiceImpl.java:104)
      at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadKieSession(KnowledgeStoreServiceImpl.java:36)
      at org.kie.internal.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(JPAKnowledgeService.java:144)
      at org.jbpm.runtime.manager.impl.factory.JPASessionFactory.findKieSessionById(JPASessionFactory.java:61)
      at org.jbpm.runtime.manager.impl.PerCaseRuntimeManager$PerCaseInitializer.initKieSession(PerCaseRuntimeManager.java:677)
      at org.jbpm.runtime.manager.impl.RuntimeEngineImpl.getKieSession(RuntimeEngineImpl.java:72)
      at org.jbpm.runtime.manager.impl.AbstractRuntimeManager.canDispose(AbstractRuntimeManager.java:197)
      at org.jbpm.runtime.manager.impl.PerCaseRuntimeManager.disposeRuntimeEngine(PerCaseRuntimeManager.java:247)
      ... 60 more
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:122)
      ... 68 more
      Caused by: java.lang.RuntimeException: Unable to load session snapshot
      at org.drools.persistence.api.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:104)
      at org.drools.persistence.PersistableRunner.initExistingKnowledgeSession(PersistableRunner.java:252)
      at org.drools.persistence.PersistableRunner.<init>(PersistableRunner.java:190)
      ... 73 more
      Caused by: java.lang.RuntimeException: Cannot read document from storage service
      at org.jbpm.document.marshalling.DocumentMarshallingStrategy.unmarshal(DocumentMarshallingStrategy.java:95)
      at org.jbpm.casemgmt.impl.marshalling.CaseFileInstanceMarshallingStrategy.unmarshal(CaseFileInstanceMarshallingStrategy.java:187)
      at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readFactHandle(ProtobufInputMarshaller.java:524)
      at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readFactHandles(ProtobufInputMarshaller.java:464)
      at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:252)
      at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:162)
      at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:114)
      at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:51)
      at org.drools.persistence.api.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:99)
      ... 75 more
      Caused by: java.lang.NullPointerException
      at org.jbpm.document.marshalling.DocumentMarshallingStrategy.unmarshal(DocumentMarshallingStrategy.java:91)
      ... 83 more

      At this point the kie server is locked and the only way to get anthing to work again is to kill (kill -9) the server since not even a Cntrl+C will stop the server.

      It appears that there is an issue with retrieving the document based on the stacktrace and error:

      RuntimeException: Cannot read document from storage service

      Show
      Start Wildfly Build and deploy the ITOrders project Create a new case using the REST API: URL (POST): http://localhost:8080/kie-server/services/rest/server/containers/itorders_1.0.0-SNAPSHOT/cases/itorders.orderhardware/instances Body: { "case-data" : { }, "case-user-assignments" : { "owner" : "username", "manager" : "username", "supplier" : "username" } , "case-group-assignments" : {"supplier" : "IT" } } Use Postman to submit the following JSON using the REST API: URL (PUT): http://localhost:8080/kie-server/services/rest/server/containers/itorders_1.0.0-SNAPSHOT/tasks/1/states/completed?auto-progress=true Body: { "hwSpec_": { "org.jbpm.document.service.impl.DocumentImpl": { "identifier": "7f6e33aa-93ec-424c-ac75-f8be7fda", "name": "drools.png", "link": "", "size": 2729, "lastModified": { "java.util.Date": 1538165956000 } , "content": "iVBORw0KGgoAAAANSUhEUgAAATYAAABiCAMAAADtCg/OAAAAw1BMVEX///9zc3PMKSsApt7yfQDmlJXyysvPNjjZX2D88vP22Njsr7DWUVPfent/f39AvOb55eWCc7qA0+/SREbq6uqKioqYmJjvvb34+Pjih4iQkJDpoqPcbG7c3Nz1nkDJycm3t7f5voDA6fft7e3Pz8/ 9/D838CdnZ2qqqq+vr6BgYH959D0lTDZ2dn4tnD717Dg3O7zhRD3rmD0jSD97+ChlsvBud3w+v32plD5xpDQ7/n6z6CQ2PHJwuGajcexqNQgseJX5+LEAAAJoUlEQVR4nO1d6WLaOBDGCcaEwyXlckxcO4UWQ0Pvu9227/9Ua9nI1jGSRoYmpPH3YzeEGWv0ZTQajWS11dKjk2HhzrP/jgySDXL0FsPuGQev684v7tusU8ZF/9o7gzFYNG4HYzRUcVag27lvC08Qo2HFT9ctcc2O2PH8vq08MVy4+zg27PfE73r9yg270rePGb1xTsq10pt6V5Q59y7tOm0sCtL0Qb8/2DtcM6sWyKPa2Bzw54VPjpuBSpCzNkD5UBEBvYa3PWtDpHDPa3jL0c/DGlr8YoD3zX8YI8+ShYI3PM//Jkg261mtmwreHveKYU4osMz98/g2/jv2PBCM6wy4nOv+3zDngcC1HqI5rh+5u3n1VksXnv3Q/odAkg+vTi7hPurJdFB3aZ6722PN3XpntTt/9WAnBafAAU9wLVZVAkYPdpQeTlv3gMCejW/vgKbvD4fTRsZoXV0ySrkFvcPD97fhLE3iKDjAwL+Bg2kjoa1bV3kueqqjQphM6tt4fBxMWyfr+VVd5ZE4CStpyzDdnI7PHUwbmREWtbXF6URHWzZmk1Mh7ii0MYWM73/On1poj4URrqfNcbar+pYeE8em7en5+bmFdteSNs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7v4BSe8nFGL4YyjFD3kXW0gaevpqUv+RGJF4Uoi3Lz9gTKAF0UkmLfnFfrOb+SYWzIWgDbNDTtqxmEuCs36SeKEwbIXwTkUOBUVzVQSxeEesM9PcBKpzNSBtYLNXTpjtZKi6y0aJK2mT4Vi/5LzzNjVnKu0P0pCnOxBtoa0UqMuQjz1hRC9oszzeMBmeq2wd6yluRdKRNxZCr6oOEJVitdkLAD5CiYpMJqOWAp6BMyK/5vJbpye82gq8lUHIWJuqilZG2bJKUvUj1OgdKVGqSeYuERa07EYpLZcUAl9+vqLg6RDJ4O52tTdenIGjLusVnMbqXhxCiUJNRKjAnHe3EIj8s6PEBrjeod0vewZhs0pB0zA/XxlfV8KK8XpzOpsRb/ek6sT/TUCI/nMoN1LlX4yLLR4eOxzlcp8joHubtY3eJUUGUN1x0FlfFdeINaxgsxH+uo2ENBeaf7IBm1gYqjOjwPBs0rmaFXt913c5jvcCzQYMGDRo0aNCgQYPHgv8B0TueKisf7ysAAAAASUVORK5CYII=", "attributes": { "_UPDATED_": "false" } } }, "supplierComment_":"Supplier comment" } Response: is 201 OK created Any document can be used by doing a base64 encoding will give the same result Now complete the next human task (Manager approval) using the REST API: URL (PUT): http://localhost:8080/kie-server/services/rest/server/containers/itorders_1.0.0-SNAPSHOT/tasks/2/states/completed?auto-progress=true Body: { "managerComment_": "Manager is happy with HW Spec", "approved_": true } If we send this over we get the error: 10:27:01,775 ERROR [org.kie.server.remote.rest.jbpm.UserTaskResource] (default task-30) Unexpected error during processing java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException: java.lang.RuntimeException: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException at org.jbpm.runtime.manager.impl.PerCaseRuntimeManager.disposeRuntimeEngine(PerCaseRuntimeManager.java:271) at org.jbpm.kie.services.impl.UserTaskServiceImpl.disposeRuntimeEngine(UserTaskServiceImpl.java:1179) at org.jbpm.kie.services.impl.UserTaskServiceImpl.completeAutoProgress(UserTaskServiceImpl.java:262) at org.kie.server.services.jbpm.UserTaskServiceBase.completeAutoProgress(UserTaskServiceBase.java:117) at org.kie.server.remote.rest.jbpm.UserTaskResource.complete(UserTaskResource.java:195) 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:497) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:406) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:213) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:228) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:65) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1501) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:330) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:137) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadKieSession(KnowledgeStoreServiceImpl.java:104) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadKieSession(KnowledgeStoreServiceImpl.java:36) at org.kie.internal.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(JPAKnowledgeService.java:144) at org.jbpm.runtime.manager.impl.factory.JPASessionFactory.findKieSessionById(JPASessionFactory.java:61) at org.jbpm.runtime.manager.impl.PerCaseRuntimeManager$PerCaseInitializer.initKieSession(PerCaseRuntimeManager.java:677) at org.jbpm.runtime.manager.impl.RuntimeEngineImpl.getKieSession(RuntimeEngineImpl.java:72) at org.jbpm.runtime.manager.impl.AbstractRuntimeManager.canDispose(AbstractRuntimeManager.java:197) at org.jbpm.runtime.manager.impl.PerCaseRuntimeManager.disposeRuntimeEngine(PerCaseRuntimeManager.java:247) ... 60 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:122) ... 68 more Caused by: java.lang.RuntimeException: Unable to load session snapshot at org.drools.persistence.api.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:104) at org.drools.persistence.PersistableRunner.initExistingKnowledgeSession(PersistableRunner.java:252) at org.drools.persistence.PersistableRunner.<init>(PersistableRunner.java:190) ... 73 more Caused by: java.lang.RuntimeException: Cannot read document from storage service at org.jbpm.document.marshalling.DocumentMarshallingStrategy.unmarshal(DocumentMarshallingStrategy.java:95) at org.jbpm.casemgmt.impl.marshalling.CaseFileInstanceMarshallingStrategy.unmarshal(CaseFileInstanceMarshallingStrategy.java:187) at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readFactHandle(ProtobufInputMarshaller.java:524) at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readFactHandles(ProtobufInputMarshaller.java:464) at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:252) at org.drools.core.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:162) at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:114) at org.drools.core.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:51) at org.drools.persistence.api.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:99) ... 75 more Caused by: java.lang.NullPointerException at org.jbpm.document.marshalling.DocumentMarshallingStrategy.unmarshal(DocumentMarshallingStrategy.java:91) ... 83 more At this point the kie server is locked and the only way to get anthing to work again is to kill (kill -9) the server since not even a Cntrl+C will stop the server. It appears that there is an issue with retrieving the document based on the stacktrace and error: RuntimeException: Cannot read document from storage service
    • 2018 Week 45-47

      Is testing the ITOrders Case Management example and is able to submit the first human task (upload hardware spec document) using the jBPM task inbox and completing the task.

      However using the REST API: PUT -
      http://localhost:8080/kie-server/services/rest/server/containers/itorders_1.0.0-SNAPSHOT/tasks/1/states/completed?auto-progress=true

      and submitting a document is causing the kie server to be unresponsive and if you try to complete the next human task (Manager approval) I get the error:

      RuntimeException: Cannot read document from storage service

      At this point the server is completely unresponsive and need to kill the wildfly server.

              swiderski.maciej Maciej Swiderski (Inactive)
              bvanderwalt@vizuri.com Ben-Johan van der Walt (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: