In that case you may want to look for a version of Hibernate that is lower down in the classpath - it looks as if whichever classloader is loading Hibernate cannot find ehcache. Is it in the classpath for glassfish (I'm afraid it is not a wecontainer I know very well)?
2009/9/7 measwel <marek_karczew...@yahoo.com.au> > > I have ehcache1.4.1.jar in the libs > > > Mike Horwitz wrote: > > > > It seems that ehcache is missing from the classpath: > > > > Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException > > Could you check to see if the ehcache jar is in the lib directory of the > > war > > you are creating? > > > > Mike > > > > > > 2009/9/7 measwel <marek_karczew...@yahoo.com.au> > > > >> > >> LS, > >> > >> I am trying to get appfuse running on the following setup: > >> - netbeans 6.7 > >> - glassfish 3 prelude with jsf 2.0 installed (mojarra) > >> - java se 5 (i cant get 6 on my mac os x 10.4) > >> > >> > >> I can compile appfuse (dont have postfix so I use mvn -package to > >> compile), > >> but when deploying it on glassfish I get the following: > >> > >> INFO: Cache provider: org.hibernate.cache.EhCacheProvider > >> INFO: ERROR [httpWorkerThread-4848-1] > >> ContextLoader.initWebApplicationContext(215) | Context initialization > >> failed > >> org.springframework.beans.factory.BeanCreationException: Error creating > >> bean > >> with name '_filterChainProxyPostProcessor': BeanPostProcessor before > >> instantiation of bean failed; nested exception is > >> org.springframework.beans.factory.BeanCreationException: Error creating > >> bean > >> with name > >> 'org.springframework.transaction.config.internalTransactionAdvisor': > >> Cannot > >> create inner bean '(inner bean)' of type > >> [org.springframework.transaction.interceptor.TransactionInterceptor] > >> while > >> setting bean property 'transactionInterceptor'; nested exception is > >> org.springframework.beans.factory.BeanCreationException: Error creating > >> bean > >> with name '(inner bean)#1': Cannot resolve reference to bean > >> 'transactionManager' while setting bean property 'transactionManager'; > >> nested exception is > >> org.springframework.beans.factory.BeanCreationException: > >> Error creating bean with name 'transactionManager' defined in class path > >> resource [applicationContext-dao.xml]: Cannot resolve reference to bean > >> 'sessionFactory' while setting bean property 'sessionFactory'; nested > >> exception is org.springframework.beans.factory.BeanCreationException: > >> Error > >> creating bean with name 'sessionFactory' defined in class path resource > >> [applicationContext-dao.xml]: Invocation of init method failed; nested > >> exception is org.hibernate.HibernateException: could not instantiate > >> RegionFactory > >> [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:405) > >> at java.security.AccessController.doPrivileged(Native Method) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) > >> at > >> > >> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > >> at > >> > >> > org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881) > >> at > >> > >> > org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:606) > >> at > >> > >> > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366) > >> at > >> > >> > org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) > >> at > >> > >> > org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) > >> at > >> > >> > org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) > >> at > >> > >> > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4623) > >> at > >> > org.apache.catalina.core.StandardContext.start(StandardContext.java:5323) > >> at com.sun.enterprise.web.WebModule.start(WebModule.java:456) > >> at > >> > >> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:922) > >> at > >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:906) > >> at > >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696) > >> at > >> > com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2205) > >> at > >> > com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1890) > >> at > >> com.sun.enterprise.web.WebApplication.start(WebApplication.java:85) > >> at > >> > >> > com.sun.enterprise.v3.server.ApplicationLifecycle.start(ApplicationLifecycle.java:560) > >> at > >> > >> > com.sun.enterprise.v3.server.ApplicationLifecycle.start(ApplicationLifecycle.java:547) > >> at > >> > >> > com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:189) > >> at > >> > >> > org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:329) > >> at > >> > com.sun.enterprise.v3.admin.CommandRunner$2.execute(CommandRunner.java:302) > >> at > >> > com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:312) > >> at > >> > com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:119) > >> at > >> > com.sun.enterprise.v3.admin.CommandRunner.doCommand(CommandRunner.java:99) > >> at > >> > com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:250) > >> at > >> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:176) > >> at > >> > com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:147) > >> at > >> > >> > com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180) > >> at > >> > >> > com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633) > >> at > >> > >> > com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570) > >> at > >> > >> > com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827) > >> at > >> > >> > com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152) > >> at > >> > >> > com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71) > >> at > >> > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) > >> at > >> > com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) > >> at > >> > com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) > >> at > >> > >> > com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67) > >> at > >> > >> > com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56) > >> at > >> > >> > com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325) > >> at > >> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184) > >> Caused by: org.springframework.beans.factory.BeanCreationException: > Error > >> creating bean with name > >> 'org.springframework.transaction.config.internalTransactionAdvisor': > >> Cannot > >> create inner bean '(inner bean)' of type > >> [org.springframework.transaction.interceptor.TransactionInterceptor] > >> while > >> setting bean property 'transactionInterceptor'; nested exception is > >> org.springframework.beans.factory.BeanCreationException: Error creating > >> bean > >> with name '(inner bean)#1': Cannot resolve reference to bean > >> 'transactionManager' while setting bean property 'transactionManager'; > >> nested exception is > >> org.springframework.beans.factory.BeanCreationException: > >> Error creating bean with name 'transactionManager' defined in class path > >> resource [applicationContext-dao.xml]: Cannot resolve reference to bean > >> 'sessionFactory' while setting bean property 'sessionFactory'; nested > >> exception is org.springframework.beans.factory.BeanCreationException: > >> Error > >> creating bean with name 'sessionFactory' defined in class path resource > >> [applicationContext-dao.xml]: Invocation of init method failed; nested > >> exception is org.hibernate.HibernateException: could not instantiate > >> RegionFactory > >> [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230) > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) > >> at java.security.AccessController.doPrivileged(Native Method) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) > >> at org.springframework.beans.factory.support.Default > >> INFO: > >> > SingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > >> at > >> > >> > org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:87) > >> at > >> > >> > org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:98) > >> at > >> > >> > org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:83) > >> at > >> > >> > org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:105) > >> at > >> > >> > org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:266) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:789) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:760) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:399) > >> ... 46 more > >> Caused by: org.springframework.beans.factory.BeanCreationException: > Error > >> creating bean with name '(inner bean)#1': Cannot resolve reference to > >> bean > >> 'transactionManager' while setting bean property 'transactionManager'; > >> nested exception is > >> org.springframework.beans.factory.BeanCreationException: > >> Error creating bean with name 'transactionManager' defined in class path > >> resource [applicationContext-dao.xml]: Cannot resolve reference to bean > >> 'sessionFactory' while setting bean property 'sessionFactory'; nested > >> exception is org.springframework.beans.factory.BeanCreationException: > >> Error > >> creating bean with name 'sessionFactory' defined in class path resource > >> [applicationContext-dao.xml]: Invocation of init method failed; nested > >> exception is org.hibernate.HibernateException: could not instantiate > >> RegionFactory > >> [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) > >> at java.security.AccessController.doPrivileged(Native Method) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219) > >> ... 66 more > >> Caused by: org.springframework.beans.factory.BeanCreationException: > Error > >> creating bean with name 'transactionManager' defined in class path > >> resource > >> [applicationContext-dao.xml]: Cannot resolve reference to bean > >> 'sessionFactory' while setting bean property 'sessionFactory'; nested > >> exception is org.springframework.beans.factory.BeanCreationException: > >> Error > >> creating bean with name 'sessionFactory' defined in class path resource > >> [applicationContext-dao.xml]: Invocation of init method failed; nested > >> exception is org.hibernate.HibernateException: could not instantiate > >> RegionFactory > >> [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) > >> at java.security.AccessController.doPrivileged(Native Method) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) > >> at > >> > >> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) > >> ... 74 more > >> Caused by: org.springframework.beans.factory.BeanCreationException: > Error > >> creating bean with name 'sessionFactory' defined in class path resource > >> [applicationContext-dao.xml]: Invocation of init method failed; nested > >> exception is org.hibernate.HibernateException: could not instantiate > >> RegionFactory > >> [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) > >> at java.security.AccessController.doPrivileged(Native Method) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) > >> at > >> > >> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) > >> at > >> > >> > org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) > >> ... 87 more > >> Caused by: org.hibernate.HibernateException: could not instantiate > >> RegionFactory > >> [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] > >> at > >> > >> > org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:412) > >> at > >> > org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:271) > >> at > >> org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101) > >> at > >> > >> > org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325) > >> at > >> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(Ann > >> INFO: otationConfiguration.java:867) > >> at > >> > >> > org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814) > >> at > >> > >> > org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732) > >> at > >> > >> > org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367) > >> at > >> > >> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333) > >> ... 97 more > >> Caused by: java.lang.reflect.InvocationTargetException > >> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > >> Method) > >> at > >> > >> > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > >> at > >> > >> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > >> at > java.lang.reflect.Constructor.newInstance(Constructor.java:494) > >> at > >> > >> > org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:407) > >> ... 106 more > >> Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException > >> at java.lang.Class.getDeclaredConstructors0(Native Method) > >> at > java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) > >> at java.lang.Class.getConstructor0(Class.java:2671) > >> at java.lang.Class.newInstance0(Class.java:321) > >> at java.lang.Class.newInstance(Class.java:303) > >> at > >> > >> > org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge.<init>(RegionFactoryCacheProviderBridge.java:63) > >> ... 111 more > >> SEVERE: WebModule[/com.hw.app_HollandWorks_war_1.0-SNAPSHOT]PWC1275: > >> Exception sending context initialized event to listener instance of > class > >> org.springframework.web.context.ContextLoaderListener > >> > >> Please advise > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/appfuse-help-requested-tp25334245s2369p25334245.html > >> Sent from the AppFuse - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > >> For additional commands, e-mail: users-h...@appfuse.dev.java.net > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/appfuse-help-requested-tp25334245s2369p25335850.html > Sent from the AppFuse - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > For additional commands, e-mail: users-h...@appfuse.dev.java.net > >