Infinispan在wildFly 13中

时间:2018-06-29 08:53:22

标签: java hibernate wildfly infinispan

使用WildFly 13,休眠5.3.1 Final,在这里我试图将infinispan设置为缓存提供程序。 Hibernate.cfg.xml:

<session-factory name="java:jboss/HibernateFactory">

    <!-- Second-level caching -->
    <property name="SecondLevelCacheEnabled">false</property>
    <property name="QueryCacheEnabled">false</property>
    <!-- <property name="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</property>  -->
    <property name="hibernate.cache.region.factory_class">org.infinispan.hibernate.cache.v53.InfinispanRegionFactory</property>

hibernate.properties:

#logging
hibernate.show_sql = false
hibernate.format_sql = false

#Transaction options
hibernate.transaction.manager_lookup_class = org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.transaction.flush_before_completion = true
hibernate.transaction.auto_close_session = true
jta.UserTransaction = java:jboss/UserTransaction

#JDBC options
hibernate.jdbc.fetch_size = 5
hibernate.jdbc.batch_size = 0

#caching options
hibernate.cache.use_second_level_cache = true
hibernate.cache.provider_class = org.infinispan.hibernate.cache.v53.InfinispanRegionFactory
hibernate.cache.use_query_cache = true
hibernate.cache.use_structured_entries = true

#jndi
hibernate.session_factory_name = java:jboss/HibernateFactory

获取

Caused by: org.hibernate.cache.CacheException: HHH025009: Unable to start region factory
        at org.infinispan.hibernate.cache.v53.InfinispanRegionFactory.start(InfinispanRegionFactory.java:248)
        at org.hibernate.cache.internal.EnabledCaching.<init>(EnabledCaching.java:77)
        at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:33)
        at org.hibernate.engine.spi.CacheInitiator.initiateService(CacheInitiator.java:24)
        at org.hibernate.service.spi.SessionFactoryServiceInitiator.initiateService(SessionFactoryServiceInitiator.java:30)
        at org.hibernate.service.internal.SessionFactoryServiceRegistryImpl.initiateService(SessionFactoryServiceRegistryImpl.java:68)
        at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
        ... 60 more
Caused by: java.lang.NullPointerException
        at org.infinispan.manager.impl.AbstractDelegatingEmbeddedCacheManager.getCacheManagerConfiguration(AbstractDelegatingEmbeddedCacheManager.java:91)
        at org.infinispan.manager.impl.AbstractDelegatingEmbeddedCacheManager.getCacheManagerConfiguration(AbstractDelegatingEmbeddedCacheManager.java:91)
        at org.infinispan.hibernate.cache.v53.InfinispanRegionFactory.defineDataTypeCacheConfigurations(InfinispanRegionFactory.java:393)
        at org.infinispan.hibernate.cache.v53.InfinispanRegionFactory.start(InfinispanRegionFactory.java:242)
        ... 66 more

启动时。

我还需要配置其他东西才能使它运行吗?

0 个答案:

没有答案