Looks like DATAJPA-617 is not completely resolved. My app doing some data work while context initialisation is in progress. Inserting default data to database. When it initialising it depends on JpaReposiotory. When spring tries to initialise Repository spring-data-jpa make check for existence of named queries.
Within NamedQuery.javaa when lookupEm.createNamedQuery is called. Later Hibernate in AbstractSharedSessionContract query is not found and exceprion is fired. Hibernate ExceptionConverterImpl fire markForRollbackOnly.
Spring-data catches this exception but it is not matter at this point. Transaction is already marked.
Problem reproduced in 100% of cases when JTA transaction manager is in use
Affects: 2.2.4 (Moore SR4)
The text was updated successfully, but these errors were encountered:
I prepaired it to use external jboss eap 7.3, but I think it is possible to also run with wildfly (maybe even embedded).
If any help is needed regarding this repository, don't hesitate to ask.
Sorry for the mess, but I only wanted to reprodce this error - if any simplification is needed - I can do it
I have a similar problem. My spring configuration is annotated with "@EnableJpaRepositories( bootstrapMode = BootstrapMode.LAZY...". When I use a repository for the first time inside a transaction and it includes query methods like "findByMycolumn", my transaction will be marked as rollbackonly for the same reason.
mirackle-spb opened DATAJPA-1686 and commented
Looks like DATAJPA-617 is not completely resolved. My app doing some data work while context initialisation is in progress. Inserting default data to database. When it initialising it depends on JpaReposiotory. When spring tries to initialise Repository spring-data-jpa make check for existence of named queries.
Within NamedQuery.javaa when lookupEm.createNamedQuery is called. Later Hibernate in AbstractSharedSessionContract query is not found and exceprion is fired. Hibernate ExceptionConverterImpl fire markForRollbackOnly.
Spring-data catches this exception but it is not matter at this point. Transaction is already marked.
Problem reproduced in 100% of cases when JTA transaction manager is in use
Affects: 2.2.4 (Moore SR4)
The text was updated successfully, but these errors were encountered: