0 Replies Latest reply on Jul 25, 2014 2:35 AM by Sumit Agarwal

    App deployment problem in Domain mode (infinispan hibernate related)

    Sumit Agarwal Newbie

      We have an application that uses infinispan cache for hibernate. The app has been working perfectly in standalone mode on EAP6.1 and 6.2.

       

      We tried moving this over to EAP6.2 and got the following error:

      javax.persistence.PersistenceException: [PersistenceUnit: instrument] Unable to build EntityManagerFactory at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) at org.jboss.threads.JBossThread.run(JBossThread.java:122) Caused by: javax.persistence.PersistenceException: [PersistenceUnit: instrument] Unable to build EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:924) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:76) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99) ... 4 more Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.spi.CacheImplementor] at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:187) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:151) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:132) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:264) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1794) at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914) ... 9 more Caused by: org.hibernate.cache.CacheException: Unable to start region factory at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:323) at org.hibernate.internal.CacheImpl.<init>(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:177) ... 15 more Caused by: java.lang.IllegalStateException: MSC000011: Service not started at org.jboss.msc.service.ValueService.getValue(ValueService.java:61) at org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1203) at org.jboss.as.clustering.msc.ServiceContainerHelper.getValue(ServiceContainerHelper.java:106) at org.jboss.as.jpa.hibernate4.infinispan.InfinispanRegionFactory.createCacheManager(InfinispanRegionFactory.java:89) at org.hibernate.cache.infinispan.InfinispanRegionFactory.start(InfinispanRegionFactory.java:308) ... 20 more


      The app worked in domain mode after we removed the following two lines from persistence.xml and this doesn't seem correct as this would result in hibernate not using Infinispan at all.

      <property name="hibernate.cache.region.factory_class" value="org.jboss.as.jpa.hibernate4.infinispan.InfinispanRegionFactory"/> 
      <property name="hibernate.cache.infinispan.cachemanager" value="java:jboss/infinispan/container/hibernate"/>


      Does anybody have any idea what could be wrong?