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

A job that must be fired immediately fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Job Service
    • False
    • None
    • False
    • ---
    • ---
    • 2023 Week 03-05 (from Jan 16)

      This bug was detected in the main-jobs-service-v2 branch, not tested in main yet.

      When we create a job that must be fired immediately, for example the execution time was elapsed at the time we create the job, an exception is produced.

      Note, the job executes well, in the sense that the REST call is executed with no issues, but, at the post execution processing (with the execution successful) the exception below is produced.

      Note: the issue was detected with postgresql, but looks like it happens with other persistence mechanisms too.

       

      To reproduce the issue, the attached process can be used, or, we can also use the new api, etc.

      TestTimerNow.bpmn

       

      Obs: sometimes, the first instance, or the second, works well, but at some point, e.g., third invocation, the reported error is produced.

       

      2023-01-20 15:31:16,523  WARN  [org.kie.kogito.jobs.service.utils.ErrorHandling:74] (vert.x-eventloop-thread-3) Error skipped when processing JobExecutionResponse[message='null', code='200', timestamp=2023-01-20T15:31:16.522059+01:00[Europe/Madrid], jobId='TIMER:15:b5bdfdd2-cf9b-4e91-a5c9-565f95ec4c44'].: java.lang.NullPointerException
          at io.smallrye.context.impl.wrappers.SlowContextualSupplier.get(SlowContextualSupplier.java:21)
          at io.smallrye.mutiny.groups.UniOnNull.lambda$failWith$1(UniOnNull.java:51)
          at io.smallrye.context.impl.wrappers.SlowContextualBiConsumer.accept(SlowContextualBiConsumer.java:21)
          at io.smallrye.mutiny.groups.UniOnItem.lambda$transformToUni$4(UniOnItem.java:178)
          at io.smallrye.context.impl.wrappers.SlowContextualConsumer.accept(SlowContextualConsumer.java:21)
          at io.smallrye.mutiny.operators.uni.builders.UniCreateWithEmitter.subscribe(UniCreateWithEmitter.java:22)
          at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
          at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.performInnerSubscription(UniOnItemTransformToUni.java:81)
          at io.smallrye.mutiny.operators.uni.UniOnItemTransformToUni$UniOnItemTransformToUniProcessor.onItem(UniOnItemTransformToUni.java:57)
          at io.smallrye.mutiny.operators.uni.builders.UniCreateFromCompletionStage$CompletionStageUniSubscription.forwardResult(UniCreateFromCompletionStage.java:63)
          at io.smallrye.context.impl.wrappers.SlowContextualBiConsumer.accept(SlowContextualBiConsumer.java:21)
          at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:859)
          at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:837)
          at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
          at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073)
          at io.smallrye.context.impl.wrappers.SlowContextualConsumer.accept(SlowContextualConsumer.java:21)
          at io.smallrye.mutiny.helpers.UniCallbackSubscriber.onItem(UniCallbackSubscriber.java:73)
          at io.smallrye.mutiny.operators.uni.UniOnItemTransform$UniOnItemTransformProcessor.onItem(UniOnItemTransform.java:43)
          at io.smallrye.mutiny.operators.uni.UniOnItemTransform$UniOnItemTransformProcessor.onItem(UniOnItemTransform.java:43)
          at io.smallrye.mutiny.vertx.AsyncResultUni.lambda$subscribe$1(AsyncResultUni.java:35)
          at io.smallrye.mutiny.vertx.DelegatingHandler.handle(DelegatingHandler.java:25)
          at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141)
          at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
          at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211)
          at io.vertx.core.impl.future.PromiseImpl.tryComplete(PromiseImpl.java:23)
          at io.vertx.sqlclient.impl.QueryResultBuilder.tryComplete(QueryResultBuilder.java:100)
          at io.vertx.sqlclient.impl.QueryResultBuilder.tryComplete(QueryResultBuilder.java:34)
          at io.vertx.core.Promise.complete(Promise.java:66)
          at io.vertx.core.Promise.handle(Promise.java:51)
          at io.vertx.core.Promise.handle(Promise.java:29)
          at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141)
          at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60)
          at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211)
          at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62)
          at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262)
          at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54)
          at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
          at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
          at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
          at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
          at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
          at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
          at java.base/java.lang.Thread.run(Thread.java:834)

            wmedvede@redhat.com Walter Medvedeo
            wmedvede@redhat.com Walter Medvedeo
            Tiago Dolphine
            Marian Macik Marian Macik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: