我尝试使用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
答案 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-embedded
,infinispan-core
- 但是,您可能会遇到进一步缺少的依赖项。