2 Replies Latest reply on Feb 10, 2010 4:11 AM by Galder Zamarreño

    Making JBoss cache work with Hibernate 3.3.1,JBoss AS 4.2.3 and Spring 2.5.x

    Bibhash Roy Newbie
      Hi,
      We have succesfully implemented EHCache 1.4.1 with Hibernate 3.3.1,JBoss 4.2.3 and Sping 2.5.x in a standalone server configuration.
      However we intend to implement JBoss clustering and move to JBoss cache. I have been trying to implement JBoss cache
      with the combination of Hibernate 3.3.1 and JBoss AS 4.2.3 and Spring 2.5.x but could not succeed so far . Can anybody say which version of JBoss Cache can be used with
      the afore-mentioned combination? Also can anybody point to suitable doc which can help to implement JBoss cache with Hibernate, JBoss AS
      and Spring combination?
        • 1. Re: Making JBoss cache work with Hibernate 3.3.1,JBoss AS 4.2.3 and Spring 2.5.x
          Bibhash Roy Newbie

          hibernate.cache.provider_class=

          org.hibernate.cache.TreeCacheProvider

           

          hibernate.cache.provider_configuration_file_resource_path=

          config/jboss-cache-1.4.1-sp13.xml

           

          hibernate.transaction.factory_class=

          org.hibernate.transaction.JTATransactionFactory

           

          I have set the above properties and I am working with JBoss cache 1.4.1.SP9, Hibernate 3.3..1, JBoss AS 4.2.3 and Spring 2.5.6 ...however I am getting the following exception..........PLEASE HELP!!!

           

          java.lang.StackOverflowError
          at java.security.AccessController.doPrivileged(Native Method)
          at com.sun.naming.internal.VersionHelper12.getContextClassLoader(VersionHelper12.java:158)
          at com.sun.naming.internal.ResourceManager.getFactory(ResourceManager.java:339)
          at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:575)
          at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533)
          at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:279)
          at javax.naming.InitialContext.lookup(InitialContext.java:351)
          at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:162)
          at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)

          • 2. Re: Making JBoss cache work with Hibernate 3.3.1,JBoss AS 4.2.3 and Spring 2.5.x
            Galder Zamarreño Master

            The only thing proven to work when trying to run Hibernate with JBoss Cache 2nd level cache in AS 4.2.3 is this: NewJBossCache14xBasedHibernate32CacheProvider

             

            Note that the site explicitly talks about Hibernate 3.2. If you need Hibernate 3.3 or higher, use JBoss 5.