I am using spring boot 1.2.3.RELEASE version with JPA over hibernate. I am experiencing following exception
org.springframework.dao.InvalidDataAccessApiUsageExce
I still got the No transactional EntityManager available
exception even after annotating my search()
method with @Transactional
.
I followed this tutorial which describes how to set up Hibernate search in Spring Boot.
The issue for me was that I had a different dependency on hibernate-search-orm
. The dependency which worked for me without any problems was
compile("org.hibernate:hibernate-search-orm:5.7.0.Final")
After adding this to the gradle build file, everything worked as expected.
Hope this helps someone else as well.