Hazelcast CacheProvider 无法实例化

Hazelcast CacheProvider not able to instantiate

我正在使用 Hazelcast 3.7 和 Hibernate jar 3。 我正在尝试使用 Hazelcast 作为二级缓存。这是我的休眠配置。

<property name="hibernate.cache.provider_class">com.hazelcast.hibernate.provider.HazelcastCacheProvider</property>

在启动我的应用程序时,这是我收到的异常

org.hibernate.HibernateException: could not instantiate CacheProvider: com.hazelcast.hibernate.provider.HazelcastCacheProvider

我也试过配置

<property name="hibernate.cache.region.factory_class">com.hazelcast.hibernate.HazelcastCacheRegionFactory</property>

但同样例外。我是否缺少任何配置?我打算将 Hazelcast 作为二级缓存,因为我想对我的应用程序进行集群。

我能够解决这个问题。这是因为我使用的是旧的 Hibernate 罐子。 hibernate-core-3.6.10.Final.jarhazelcast-all-3.7.3.jar 问题得到解决。