3 Replies Latest reply on Sep 24, 2012 12:43 PM by Ove Ranheim

    Failed to stop persistence unit, because of Hibernate Infinispan cache provider in AS 7.1.3

    Ove Ranheim Novice

      Hello,

       

      I've built JBoss AS 7.1.3.Final from sources and discovered an error I did not see with AS 7.1.1.Final.

       

      The exception I got is:

       

      16:44:29,728 INFO  [org.jboss.as.clustering.infinispan] JBAS010281: Started local-query cache from hibernate container
      16:44:29,728 ERROR [org.jboss.as.jpa] JBAS011406: Failed to stop persistence unit service musific-next.war#partsunit: 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.stopCacheRegions(InfinispanRegionFactory.java:339)
                at org.hibernate.cache.infinispan.InfinispanRegionFactory.stop(InfinispanRegionFactory.java:333)
                at org.hibernate.internal.CacheImpl.close(CacheImpl.java:279)
                at org.hibernate.internal.SessionFactoryImpl.close(SessionFactoryImpl.java:1340)
                at org.hibernate.ejb.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:194)
                at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2.run(PersistenceUnitServiceImpl.java:121)
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_35]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_35]
                at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_35]
                at org.jboss.threads.JBossThread.run(JBossThread.java:122)
      
      
      16:44:29,738 INFO  [com.arjuna.ats.jbossatx] ARJUNA032018: Destroying TransactionManagerService
      16:44:29,738 INFO  [com.arjuna.ats.jbossatx] ARJUNA032014: Stopping transaction recovery manager
      16:44:29,744 INFO  [org.jboss.as.clustering.infinispan] JBAS010282: Stopped local-query cache from hibernate container
      16:44:29,801 INFO  [org.jboss.as.server.deployment] JBAS015877: Stopped deployment musific-next.war in 401ms
      16:44:29,802 INFO  [org.jboss.as] JBAS015950: JBoss AS 7.1.3.Final "Arges" stopped in 397ms
      
      
      

       

      Any idea?

       

      Ove

        • 1. Re: Failed to stop persistence unit, because of Hibernate Infinispan cache provider in AS 7.1.3
          Ove Ranheim Novice

          This error was my own fault, because I did not patch my custom standalone.xml correctly when upgrading to 7.1.3.Final.

           

          <cache-container name="hibernate" default-cache="local-query" module="org.jboss.as.jpa.hibernate:4">
          </cache-container>
          

           

          Config in persistence.xml

           

          <property name="hibernate.cache.use_second_level_cache" value="true" />
          <property name="hibernate.cache.use_query_cache" value="true" />
          

           

          Now, during shutdown connections are closed and cleaned up.

           

          13:03:48,752 INFO  [org.jboss.as.jpa] JBAS011403: Stopping Persistence Unit Service 'musific-next.war#partsunit'
          13:03:48,753 INFO  [org.jboss.as.clustering.infinispan] JBAS010282: Stopped musific-next.war#partsunit.org.hibernate.cache.internal.StandardQueryCache cache from hibernate container
          13:03:48,754 INFO  [org.jboss.as.clustering.infinispan] JBAS010282: Stopped musific-next.war#partsunit.org.hibernate.cache.spi.UpdateTimestampsCache cache from hibernate container
          13:03:48,756 INFO  [org.infinispan.jmx.CacheJmxRegistration] ISPN000031: MBeans were successfully registered to the platform mbean server.
          13:03:48,756 INFO  [org.jboss.as.clustering.infinispan] JBAS010281: Started local-query cache from hibernate container
          13:03:48,778 INFO  [com.arjuna.ats.jbossatx] ARJUNA032018: Destroying TransactionManagerService
          13:03:48,778 INFO  [com.arjuna.ats.jbossatx] ARJUNA032014: Stopping transaction recovery manager
          13:03:48,813 INFO  [org.jboss.as.clustering.infinispan] JBAS010282: Stopped local-query cache from hibernate container
          13:03:48,845 INFO  [org.jboss.as.server.deployment] JBAS015877: Stopped deployment musific-next.war in 285ms
          13:03:48,847 INFO  [org.jboss.as] JBAS015950: JBoss AS 7.1.3.Final "Arges" stopped in 278ms
          
          • 2. Re: Failed to stop persistence unit, because of Hibernate Infinispan cache provider in AS 7.1.3
            Scott Marlow Master

            Good to hear, what were the previous (custom) standalone.xml settings for cache-container?

            • 3. Re: Failed to stop persistence unit, because of Hibernate Infinispan cache provider in AS 7.1.3
              Ove Ranheim Novice

              In AS 7.1.1 the cache-container element did not declare module="org.jboss.as.jpa.hibernate:4". This is required in 7.1.3.