Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-5467

Error while marshalling process instance (multiple instance ArrayList)

XMLWordPrintable

    • False
    • False
    • Undefined
    • Hide

      I've prepared reproducer project:

      https://github.com/jgrabowski/infinispan-persistence-problem-reproducer

      It's required to have inifinispan running on 11222 port with username/password. Process is launched via swagger-ui or POST:

      curl -X 'POST' \
       'http://localhost:10000/Main' \
       -H 'accept: */*' \
       -H 'Content-Type: application/json' \
       -d '{}'

      Branches for each case are mentioned in problem description.

      Show
      I've prepared reproducer project: https://github.com/jgrabowski/infinispan-persistence-problem-reproducer It's required to have inifinispan running on 11222 port with username/password. Process is launched via swagger-ui or POST: curl -X 'POST' \ 'http: //localhost:10000/Main' \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d '{}' Branches for each case are mentioned in problem description.
    • 2021 Week 37-39 (from Sep 13), 2021 Week 40-42 (from Oct 4), 2021 Week 43-45 (from Oct 25), 2021 Week 46-48 (from Nov 15)

      Process persistence seems to be broken for multiple instance. Process runs fine when no persistence engine is enabled.

      I've prepared reproducer on github with branches for each scenario.

      Problematic scenarios:

      1. Input and output collections (ArrayList) for multiple instance are not set as internal process variables (branch for this case is variables-not-internal)

      In this scenario it doesn't compile after turning on persistence.

      2. Input and output collections are set as internal (branch is variables-internal)

      It compiles but gives an error while trying to instantiate process

      Caused by: org.kie.kogito.serialization.process.ProcessInstanceMarshallerException: Error while marshalling process instance
       at org.kie.kogito.serialization.process.ProcessInstanceMarshallerService.marshallProcessInstance(ProcessInstanceMarshallerService.java:111)
       at org.kie.kogito.infinispan.CacheProcessInstances.updateStorage(CacheProcessInstances.java:122)
       at org.kie.kogito.infinispan.CacheProcessInstances.create(CacheProcessInstances.java:116)
       at org.kie.kogito.process.impl.AbstractProcessInstance.lambda$start$0(AbstractProcessInstance.java:226)
       at org.kie.kogito.services.uow.ProcessInstanceWorkUnit.perform(ProcessInstanceWorkUnit.java:47)
       at org.kie.kogito.services.uow.CollectingUnitOfWork.end(CollectingUnitOfWork.java:62)
       at org.kie.kogito.services.uow.ManagedUnitOfWork.end(ManagedUnitOfWork.java:51)
       at org.kie.kogito.services.uow.UnitOfWorkExecutor.executeInUnitOfWork(UnitOfWorkExecutor.java:34)
       at org.kie.kogito.process.impl.ProcessServiceImpl.createProcessInstance(ProcessServiceImpl.java:58)
       at com.example.MainResource.createResource_Main(MainResource.java:72)
       at com.example.MainResource_Subclass.createResource_Main$$superforward1(MainResource_Subclass.zig:340)
       at com.example.MainResource_Subclass$$function$$12.apply(MainResource_Subclass$$function$$12.zig:53)
       at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
       at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
       at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)
       at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(InvocationInterceptor_Bean.zig:521)
       at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
       at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
       at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
       at com.example.MainResource_Subclass.createResource_Main(MainResource_Subclass.zig:892)
       at com.example.MainResource_ClientProxy.createResource_Main(MainResource_ClientProxy.zig:328)
       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)
      org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
       at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)
       at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660)
       at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524)
       at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
       at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
       at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476)
       at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434)
       at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:408)
       at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69)
       at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
       ... 47 more
      Caused by: java.lang.NullPointerException
       at com.google.protobuf.Internal.checkNotNull(Internal.java:63)
       at com.google.protobuf.AbstractMessageLite$Builder.addAll(AbstractMessageLite.java:405)
       at org.kie.kogito.serialization.process.protobuf.KogitoNodeInstanceContentsProtobuf$ForEachNodeInstanceContent$Builder.addAllTimerInstanceId(KogitoNodeInstanceContentsProtobuf.java:12113)
       at org.kie.kogito.serialization.process.impl.ProtobufProcessInstanceWriter.buildForEachNodeInstance(ProtobufProcessInstanceWriter.java:272)
       at org.kie.kogito.serialization.process.impl.ProtobufProcessInstanceWriter.buildNodeInstanceContent(ProtobufProcessInstanceWriter.java:232)
       at org.kie.kogito.serialization.process.impl.ProtobufProcessInstanceWriter.buildNodeInstances(ProtobufProcessInstanceWriter.java:221)
       at org.kie.kogito.serialization.process.impl.ProtobufProcessInstanceWriter.buildWorkflowContext(ProtobufProcessInstanceWriter.java:193)
       at org.kie.kogito.serialization.process.impl.ProtobufProcessInstanceWriter.writeProcessInstance(ProtobufProcessInstanceWriter.java:146)
       at org.kie.kogito.serialization.process.impl.ProtobufProcessInstanceMarshaller.writeProcessInstance(ProtobufProcessInstanceMarshaller.java:39)
       at org.kie.kogito.serialization.process.ProcessInstanceMarshallerService.marshallProcessInstance(ProcessInstanceMarshallerService.java:108)
       ... 82 more

      3. Custom wrapper (class that extends ArrayList<String>) is used (branch is custom-wrapper)

      It gives the same error as point 2.

              tdolphin-1 Tiago Dolphine (Inactive)
              jakubgrabowski Jakub Grabowski (Inactive)
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: