I want to use Infinispan with hibernate second level cache. My application is running in a glassfish 3 application server and I use hibernate JPA. The hibernate library already contains infinispan so I didn't added to my project. I use jta transaction. To do that I modify my persistence.xml:
<!-- Infinispan second level cache configuration -->
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.infinispan.InfinispanRegionFactory"/>
<property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory"/>
When I redeploy the application I get the following exception:
java.lang.NoClassDefFoundError: org/infinispan/transaction/lookup/TransactionManagerLookup
Should I try to add the infinispan library to the project?
I tried to set:
<property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory"/>
but didn't worked.
Thanks in advance.