6 Replies Latest reply on Jan 4, 2009 12:26 PM by Ryan LaMothe

    Cache service not registered on cold start EAR persistent un

    Ryan LaMothe Newbie

      I have been working to enable Hibernate second-level entity caching for use with our detached entities.

      Server: JBossAS 4.2.2
      Cache: 1.4.1 (included version in JBossAS 4.2.2)

      The behavior that I am seeing is that if I cold start the container with no EAR deployed, everything starts fine, including the cache. Then I deploy the EAR and the persistence unit deploys fine and finds the cache service MBean.

      Now, if deploy the EAR and cold start the container the persistence unit fails to load because it cannot find the cache service. The exception is as follows:

      javax.persistence.PersistenceException: org.hibernate.cache.CacheException: java.lang.RuntimeException: Error creating MBeanProxy: jboss.cache:service=EJB3EntityCache

      Hot deploy the EAR and the persistence unit will be found.

      How do I configure either JBoss or my EAR/persistence to depend on the cache being completed deployed before the EAR?

      If you need me to post any files, please let me know. Thanks!