[jboss-jira] [JBoss JIRA] (HIBERNATE-134) Infinispan custom cache command factory not installed error during app deployment

Scott Marlow (JIRA) issues at jboss.org
Thu Nov 19 10:29:00 EST 2015


    [ https://issues.jboss.org/browse/HIBERNATE-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130909#comment-13130909 ] 

Scott Marlow commented on HIBERNATE-134:
----------------------------------------

As far as the problem goes, I would start with not specifying the hibernate.cache.region.factory_class property in the persistence unit and see if that helps.  The other thing that I would do, is use the latest WildFly build or release.  Nightly WildFly builds are available at [https://community.jboss.org/thread/224262

> Infinispan custom cache command factory not installed error during app deployment
> ---------------------------------------------------------------------------------
>
>                 Key: HIBERNATE-134
>                 URL: https://issues.jboss.org/browse/HIBERNATE-134
>             Project: Hibernate Integration
>          Issue Type: Bug
>         Environment: Ubuntu 12.04, JBoss AS 7.1.2, Hibernate 4.1.2, Infinispan 5.1.4
>            Reporter: Dmitry Chuiko
>            Assignee: Steve Ebersole
>
> We use Infinispan as 2LC for Hibernate in a clustered configuration under JBoss 7. So {{persistence.xml}} contains the following line: {code:xml}<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.infinispan.InfinispanRegionFactory"/>{code}. The following error occurs during app deployment:  
> {noformat}12:04:52,859 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-14) MSC00001: Failed to start service jboss.persistenceunit."MOYsklad.ear/sklad-base.jar#MOYsklad": org.jboss.msc.service.StartException in service jboss.persistenceunit."MOYsklad.ear/sklad-base.jar#MOYsklad": Failed to start service
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]
> Caused by: javax.persistence.PersistenceException: [PersistenceUnit: MOYsklad] Unable to build EntityManagerFactory
> 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)
> 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)
> 	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)
> 	at org.hibernate.ejb.HibernatePersistenceLognex.createContainerEntityManagerFactory(HibernatePersistenceLognex.java:16)
> 	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
> 	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
> 	... 3 more
> Caused by: org.hibernate.cache.CacheException: Infinispan custom cache command factory not installed (possibly because the classloader where Infinispan lives couldn't find the Hibernate Infinispan cache provider)
> 	at org.hibernate.cache.infinispan.InfinispanRegionFactory.getCacheCommandFactory(InfinispanRegionFactory.java:500)
> 	at org.hibernate.cache.infinispan.InfinispanRegionFactory.startRegion(InfinispanRegionFactory.java:379)
> 	at org.hibernate.cache.infinispan.InfinispanRegionFactory.buildEntityRegion(InfinispanRegionFactory.java:212)
> 	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:347)
> 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741)
> 	at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:93)
> 	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)
> 	... 10 more
> {noformat}
> This issue takes place because context {{ClassLoader}} is substituted in {{org.hibernate.ejb.Ejb3Configuration#configure}}. So Infinispan can not find {{org.infinispan.commands.module.ModuleCommandExtensions}} realization from {{hibernate-infinispan}} module in {{org.infinispan.util.ModuleProperties#loadModuleCommandHandlers}} method.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list