Hibernate和Infinispan嵌入式兼容性

时间:2015-11-18 15:34:48

标签: hibernate infinispan

我尝试使用Infinispan嵌入式作为Hibernate 2LC提供商。 在哪里可以找到infinispan-embedded依赖项的正确版本以与hibernate-infinispan集成?

我尝试了不同版本的infinispan-embedded dep(6,7和8)的Hibernate 4.3.x.我收到一些初始化错误。例如,当我使用infinispan-embedded 8.0.1.Final时,我收到以下错误:

Caused by: org.hibernate.cache.CacheException: Unable to start region factory
    at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:340)
    at org.hibernate.internal.CacheImpl.(CacheImpl.java:70)
    at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:40)
    at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:35)
    at org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.initiateService(SessionFactoryServiceRegistryImpl.java:91)
    at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:251)
    ... 32 more
Caused by: java.lang.NoSuchMethodError: org.infinispan.commons.util.ServiceFinder.load(Ljava/lang/Class;[Ljava/lang/ClassLoader;)Ljava/util/Collection;
    at org.infinispan.configuration.parsing.ParserRegistry.(ParserRegistry.java:53)
    at org.hibernate.cache.infinispan.InfinispanRegionFactory.createCacheManager(InfinispanRegionFactory.java:414)
    at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:323)
    ... 37 more

1 个答案:

答案 0 :(得分:1)

Hibernate 4.3.x是针对Infinispan 6.0.0.Final构建的,请参阅libraries.gradle。它没有针对VAR spchars VARCHAR spchars := '!#$%&()*+/:;<=>?@[\\\]^`{}|~' select * from (select dcid, LastFirst, Last_Name, First_Name, middle_name, CASE WHEN REGEXP_LIKE(First_Name, '[ || spchars || ]*$' ) THEN '0' ELSE '1' END AS FNSPC from employees) where FNSPC = '0'; / 构建(或测试),如果您不使用Maven,则下载工件infinispan-embeddedinfinispan-core - 但是,您可能会遇到进一步缺少的依赖项。