3 Replies Latest reply on May 18, 2006 10:29 AM by Ales Justin

    Unable to hot-deploy EJB/Spring/Hibernate application in JBo

    msmolyak Newbie

      Hello,

      I have an application which uses Hibernate in the data access tier fronted with Spring DAOs. On top of this standard architecture I added a thin EJB layer: Stateless Session EJBs wrapping the Spring business objects. The application deploys and runs fine. I am able to run a client Java program calling a method on a session bean which works correctly.

      When I try to redeploy this application without restarting JBoss, and run my client again I get the error below. Restarting the server fixes the problem.

      Any help in resolving the hot deployment issue is greatly appreciated.

      Michael Smolyak

      17:19:27,684 INFO [STDOUT] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'CruiseSessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Cannot configure CacheManager: null
      17:19:27,731 INFO [STDOUT] org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Cannot configure CacheMan
      ager: null
      at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:127)
      at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:167)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1055)
      at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:767)
      at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:693)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1003)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:348)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:957)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:768)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:330)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:317)
      at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:80)
      at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:65)
      at org.springframework.context.access.ContextJndiBeanFactoryLocator.createBeanFactory(ContextJndiBeanFactoryLocator.java:86)
      at org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:70)
      at org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:117)
      at org.springframework.ejb.support.AbstractStatelessSessionBean.ejbCreate(AbstractStatelessSessionBean.java:63)
      at com.jetson.test.biz.CustomerManagerBean.ejbCreate(CustomerManagerBean.java:58)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionEnterpriseContext.(StatelessSessionEnterpriseContext.java:63)
      at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:35) at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:161) at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:78)