我有一个" IncompatibleClassChangeError"将hibernate和infinispan集成到一个标准环境中的问题,谷歌搜索没有找到结果。
版本:
Hibernate 4.3.7.Final
Infinispan 7.0.2.Final
Spring 4.1.1.RELEASE
Atomikos 3.9.3
Exceptinos:
Caused by: java.lang.IncompatibleClassChangeError: Found class org.infinispan.commons.util.FileLookup, but interface was expected
at org.hibernate.cache.infinispan.InfinispanRegionFactory.createCacheManager(InfinispanRegionFactory.java:406)
at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:323)
... 141 more
春天的配置:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="packagesToScan" value="qfy.tousu.model"></property>
<property name="jtaTransactionManager" ref="transactionManager"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.query.substitutions">true 1, false 0</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.max_fetch_depth">3</prop>
<prop key="hibernate.default_entity_mode">pojo</prop>
<prop key="hibernate.default_batch_fetch_size">16</prop>
<prop key="hibernate.jdbc.batch_size">20</prop>
<prop key="hibernate.order_updates">true</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.infinispan.InfinispanRegionFactory</prop>
<prop key="hibernate.generate_statistics">true</prop>
<prop key="hibernate.cache.use_structured_entries">true</prop>
</props>
</property>
</bean>