fjtirado opened a new issue, #3405:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3405

   ### Describe the bug
   
   This exception occurs when starting DataIndex on embedded mode
   
   2024-02-15 16:07:24,920 ERROR [io.qua.rea.htt.run.ReactiveHttpHandlerBean] 
(vert.x-eventloop-thread-1) Failed to process message.: 
java.util.ConcurrentModificationException: 
jakarta.persistence.EntityExistsException: A different object with the same 
identifier value was already associated with the session : 
[org.kie.kogito.index.jpa.model.ProcessDefinitionEntity#ProcessDefinitionKey 
[id=m2k, version=1.0]]
        at 
org.kie.kogito.index.jpa.storage.AbstractStorage.put(AbstractStorage.java:67)
        at 
org.kie.kogito.index.jpa.storage.ProcessDefinitionEntityStorage_Subclass.put$$superforward(Unknown
 Source)
        at 
org.kie.kogito.index.jpa.storage.ProcessDefinitionEntityStorage_Subclass$$function$$2.apply(Unknown
 Source)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:73)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInCallerTx(TransactionalInterceptorBase.java:335)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.doIntercept(TransactionalInterceptorRequired.java:40)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:61)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:32)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired_Bean.intercept(Unknown
 Source)
        at 
io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)
        at 
io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)
        at 
org.kie.kogito.index.jpa.storage.ProcessDefinitionEntityStorage_Subclass.put(Unknown
 Source)
        at 
org.kie.kogito.index.jpa.storage.ProcessDefinitionEntityStorage_ClientProxy.put(Unknown
 Source)
        at 
org.kie.kogito.index.service.IndexingService.indexProcessDefinition(IndexingService.java:96)
        at 
org.kie.kogito.index.service.IndexingService_Subclass.indexProcessDefinition$$superforward(Unknown
 Source)
        at 
org.kie.kogito.index.service.IndexingService_Subclass$$function$$1.apply(Unknown
 Source)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:73)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)
        at 
io.smallrye.faulttolerance.FaultToleranceInterceptor.lambda$syncFlow$3(FaultToleranceInterceptor.java:253)
        at 
io.smallrye.faulttolerance.core.InvocationContext.call(InvocationContext.java:20)
        at io.smallrye.faulttolerance.core.Invocation.apply(Invocation.java:29)
        at io.smallrye.faulttolerance.core.retry.Retry.doApply(Retry.java:88)
        at io.smallrye.faulttolerance.core.retry.Retry.apply(Retry.java:42)
        at 
io.smallrye.faulttolerance.core.metrics.MetricsCollector.doApply(MetricsCollector.java:101)
        at 
io.smallrye.faulttolerance.core.metrics.MetricsCollector.apply(MetricsCollector.java:91)
        at 
io.smallrye.faulttolerance.FaultToleranceInterceptor.syncFlow(FaultToleranceInterceptor.java:255)
        at 
io.smallrye.faulttolerance.FaultToleranceInterceptor.intercept(FaultToleranceInterceptor.java:182)
        at 
io.smallrye.faulttolerance.FaultToleranceInterceptor_Bean.intercept(Unknown 
Source)
        at 
io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)
        at 
io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)
        at 
org.kie.kogito.index.service.IndexingService_Subclass.indexProcessDefinition(Unknown
 Source)
        at 
org.kie.kogito.index.service.IndexingService_ClientProxy.indexProcessDefinition(Unknown
 Source)
        at 
org.kie.kogito.index.service.messaging.BlockingMessagingEventConsumer.onProcessDefinitionDataEvent(BlockingMessagingEventConsumer.java:88)
        at 
org.kie.kogito.index.service.messaging.BlockingMessagingEventConsumer_Subclass.onProcessDefinitionDataEvent$$superforward(Unknown
 Source)
        at 
org.kie.kogito.index.service.messaging.BlockingMessagingEventConsumer_Subclass$$function$$2.apply(Unknown
 Source)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:73)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:136)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:107)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.doIntercept(TransactionalInterceptorRequired.java:38)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:61)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:32)
        at 
io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequired_Bean.intercept(Unknown
 Source)
        at 
io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
        at 
io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)
        at 
io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)
        at 
org.kie.kogito.index.service.messaging.BlockingMessagingEventConsumer_Subclass.onProcessDefinitionDataEvent(Unknown
 Source)
        at 
org.kie.kogito.index.service.messaging.BlockingMessagingEventConsumer_ClientProxy.onProcessDefinitionDataEvent(Unknown
 Source)
        at 
org.kie.kogito.index.service.messaging.BlockingMessagingEventConsumer_SmallRyeMessagingInvoker_onProcessDefinitionDataEvent_39d9181d1678dd20e4a46849b638789e487fd879.invoke(Unknown
 Source)
        at 
io.smallrye.reactive.messaging.providers.AbstractMediator.lambda$invokeBlocking$11(AbstractMediator.java:166)
        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.builders.UniCreateFromDeferredSupplier.subscribe(UniCreateFromDeferredSupplier.java:36)
        at 
io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
        at 
io.smallrye.mutiny.groups.UniSubscribe.withSubscriber(UniSubscribe.java:51)
        at io.smallrye.mutiny.groups.UniSubscribe.with(UniSubscribe.java:110)
        at io.smallrye.mutiny.groups.UniSubscribe.with(UniSubscribe.java:88)
        at io.vertx.mutiny.core.Context$1.handle(Context.java:172)
        at io.vertx.mutiny.core.Context$1.handle(Context.java:170)
        at 
io.vertx.core.impl.ContextBase.lambda$executeBlocking$1(ContextBase.java:180)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:277)
        at 
io.vertx.core.impl.ContextBase.lambda$internalExecuteBlocking$2(ContextBase.java:199)
        at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
        at 
io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
        at 
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at 
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
        at 
org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:840)
   Caused by: jakarta.persistence.EntityExistsException: A different object 
with the same identifier value was already associated with the session : 
[org.kie.kogito.index.jpa.model.ProcessDefinitionEntity#ProcessDefinitionKey 
[id=m2k, version=1.0]]
        at 
org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:123)
        at 
org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162)
        at 
org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:168)
        at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:761)
        at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:739)
        at 
io.quarkus.hibernate.orm.runtime.session.TransactionScopedSession.persist(TransactionScopedSession.java:145)
        at 
org.hibernate.engine.spi.SessionLazyDelegator.persist(SessionLazyDelegator.java:275)
        at 
org.hibernate.Session_3a974b6a18ac399f675913d732c105426414d370_Synthetic_ClientProxy.persist(Unknown
 Source)
        at 
io.quarkus.hibernate.orm.panache.common.runtime.AbstractJpaOperations.persist(AbstractJpaOperations.java:101)
        at 
io.quarkus.hibernate.orm.panache.common.runtime.AbstractJpaOperations.persist(AbstractJpaOperations.java:96)
        at 
io.quarkus.hibernate.orm.panache.PanacheRepositoryBase.persistAndFlush(PanacheRepositoryBase.java:68)
        at 
org.kie.kogito.index.jpa.storage.AbstractStorage.put(AbstractStorage.java:65)
        ... 73 more
   
   ### Expected behavior
   
   No exception sohuld occur
   
   ### Actual behavior
   
   _No response_
   
   ### How to Reproduce?
   
   _No response_
   
   ### Output of `uname -a` or `ver`
   
   _No response_
   
   ### Output of `java -version`
   
   _No response_
   
   ### GraalVM version (if different from Java)
   
   _No response_
   
   ### Kogito version or git rev (or at least Quarkus version if you are using 
Kogito via Quarkus platform BOM)
   
   _No response_
   
   ### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
   
   _No response_
   
   ### Additional information
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to