Я пытаюсь создать кэш второго уровня, используя hazelcast-hibernate52 (который поддерживает hibernate 5.2.12. Думаю, что окончательный вариант) при запуске выдает следующее исключение
Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [com.hazelcast.hibernate.HazelcastCacheRegionFactory] as strategy [org.hibernate.cache.spi.RegionFactory]
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:126)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:194)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:161)
at org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:67)
at org.hibernate.cache.internal.RegionFactoryInitiator.initiateService(RegionFactoryInitiator.java:28)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:259)
... 47 more
Ниже приведены мои весенние ореховые конфигурации
<hz:hazelcast id="instance">
<hz:config>
<hz:instance-name>hazelcast</hz:instance-name>
<!-- <hz:spring-aware /> -->
<hz:group name="dev" password="dev-password"/>
<hz:management-center enabled="true" url="http://localhost:9008/hazelcast-mancenter"/>
<hz:properties>
<hz:property name="hazelcast.merge.first.run.delay.seconds">5</hz:property>
<hz:property name="hazelcast.merge.next.run.delay.seconds">5</hz:property>
</hz:properties>
<hz:network port="5701" port-auto-increment="false" port-count="1">
<hz:join>
<!-- Enable for auto detection -->
<hz:multicast enabled="true" />
<hz:tcp-ip enabled="false">
<hz:members>120.0.0.1</hz:members>
</hz:tcp-ip>
</hz:join>
<hz:interfaces>
<hz:interface>120.0.0.*</hz:interface>
</hz:interfaces>
</hz:network>
Это мои весенние спящие конфигурации
<bean id="tpSessionFactory"
class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
<property name="dataSource" ref="tpDataSource"></property>
<property name="hibernateProperties">
<props>
<!-- <prop key="hibernate.dialect">${db.dialect}</prop> -->
<prop key="hibernate.show_sql">${db.show_sql}</prop>
<prop key="hibernate.hbm2ddl.auto">${db.hbm2ddl.auto}</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.region.factory_class">com.hazelcast.hibernate.HazelcastCacheRegionFactory</prop>
<prop key="hibernate.cache.hazelcast.instance_name">hazelcast</prop>
</props>
и используемые зависимости:
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-all</artifactId>
<version>3.10.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-spring</artifactId>
<version>3.10.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-hibernate52</artifactId>
<version>1.2</version>
</dependency>
Есть что-нибудь, чего мне здесь не хватает?