Infinispan中的IncompatibleClassChangeError是一个Hibernate集成

时间:2014-11-26 04:02:32

标签: hibernate infinispan

我有一个" 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>

1 个答案:

答案 0 :(得分:1)

嗯,好像你可能发现了我们为保持Infinispan 7向后兼容ISPN-4686所做的工作的错误。我建议坚持使用Infinispan 6.x直到我们整理出来。我创建了ISPN-5029来解决这个问题。对此给您带来的不便表示歉意。