alishaaaqil opened a new issue, #2070:
URL: https://github.com/apache/incubator-kie-issues/issues/2070

   When running a Spring Boot app that uses JPA user-task storage by adding the 
jbpm-addons-springboot-usertask-storage-jpa dependency , two problems occur:
   
   On user task activation, Hibernate can’t find the JPA entity classes from 
the addon. -> UnknownEntityTypeException.
   ```
   java.lang.IllegalArgumentException: Unable to locate persister: 
org.jbpm.usertask.jpa.model.UserTaskInstanceEntity
       at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:764)
       at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:745)
       ...
       at 
org.jbpm.usertask.jpa.repository.BaseRepository.persist(BaseRepository.java:44)
       at 
org.jbpm.usertask.jpa.JPAUserTaskInstances.create(JPAUserTaskInstances.java:79)
       ...
       at 
org.kie.kogito.jbpm.usertask.handler.UserTaskKogitoWorkItemHandler.activateWorkItemHandler(UserTaskKogitoWorkItemHandler.java:85)
   ```
   
   On timer/abort paths, user-task persistence code runs outside a transaction, 
causing TransactionRequiredException and LazyInitializationException when 
loading lazy collections.
   ```
   org.hibernate.LazyInitializationException: failed to lazily initialize a 
collection of role:
     org.jbpm.usertask.jpa.model.UserTaskInstanceEntity.attachments: could not 
initialize proxy - no Session
       at 
org.hibernate.collection.spi.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:635)
       ...
       at 
org.jbpm.usertask.jpa.JPAUserTaskInstances.findById(JPAUserTaskInstances.java:51)
       at 
org.kie.kogito.jbpm.usertask.handler.UserTaskKogitoWorkItemHandler.abortWorkItemHandler(UserTaskKogitoWorkItemHandler.java:151)
   ```
   
   


-- 
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