0

I have a "IncompatibleClassChangeError" problem when integrating hibernate and infinispan in a standalong enviroment, search in google found no results.

versions:

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

config in spring:

<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 Answer 1

1

Hmmm, seems like you might have found a bug with the work we did to keep Infinispan 7 backwards compatible in ISPN-4686. I'd suggest sticking to Infinispan 6.x until we've sorted it out. I've created ISPN-5029 to get this fixed. Apologies for the inconvenience.

2
  • Bug report is ISPN-5029. A fix should be available in next 7.0.x release. Nov 27, 2014 at 13:59
  • Thanks, I'll use 6.x for now, looking forward to the new release.
    – naddy
    Nov 28, 2014 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.