cancel
Showing results for 
Search instead for 
Did you mean: 

Problem : Context Initialization failed

broken
Champ in-the-making
Champ in-the-making
Hi everydody,

I've got a problem when I try to launch tomcat6 :

Apr 16, 2010 2:11:47 PM org.apache.catalina.core.AprLifecycleListener initINFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/i386/server:/usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.12/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/libApr 16, 2010 2:11:47 PM org.apache.coyote.http11.Http11Protocol initINFO: Initializing Coyote HTTP/1.1 on http-8080Apr 16, 2010 2:11:47 PM org.apache.coyote.http11.Http11Protocol initINFO: Initializing Coyote HTTP/1.1 on http-8443Apr 16, 2010 2:11:47 PM org.apache.catalina.startup.Catalina loadINFO: Initialization processed in 788 msApr 16, 2010 2:11:47 PM org.apache.catalina.core.StandardService startINFO: Starting service CatalinaApr 16, 2010 2:11:47 PM org.apache.catalina.core.StandardEngine startINFO: Starting Servlet Engine: Apache Tomcat/6.0.24Apr 16, 2010 2:11:47 PM org.apache.catalina.startup.HostConfig deployDescriptorINFO: Deploying configuration descriptor host-manager.xmlApr 16, 2010 2:11:47 PM org.apache.catalina.startup.HostConfig deployDescriptorINFO: Deploying configuration descriptor ROOT.xmlApr 16, 2010 2:11:48 PM org.apache.catalina.startup.HostConfig deployDescriptorINFO: Deploying configuration descriptor alfresco.xmlApr 16, 2010 2:11:48 PM org.apache.catalina.core.StandardContext addApplicationListenerINFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.14:11:52,390  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]14:11:52,391  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]14:11:52,392  INFO  [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from URL [file:/var/lib/tomcat6/shared/classes/alfresco-global.properties]14:11:52,465  INFO  [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]14:11:52,803  ERROR [web.context.ContextLoader] Context initialization failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'qnameEntitySharedCache' defined in class path resource [alfresco/cache-context.xml]: Cannot create inner bean 'org.springframework.cache.ehcache.EhCacheFactoryBean#1a697a1' of type [org.springframework.cache.ehcache.EhCacheFactoryBean] while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#1a697a1' defined in class path resource [alfresco/cache-context.xml]: Cannot resolve reference to bean 'internalEHCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'internalEHCacheManager': FactoryBean threw exception on object creation; nested exception is org.alfresco.error.AlfrescoRuntimeException: 03160000 EHCache configuration failed        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1305)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)        at org.apache.catalina.core.StandardService.start(StandardService.java:516)        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)        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:597)        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#1a697a1' defined in class path resource [alfresco/cache-context.xml]: Cannot resolve reference to bean 'internalEHCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'internalEHCacheManager': FactoryBean threw exception on object creation; nested exception is org.alfresco.error.AlfrescoRuntimeException: 03160000 EHCache configuration failed        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1305)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)        … 40 moreCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'internalEHCacheManager': FactoryBean threw exception on object creation; nested exception is org.alfresco.error.AlfrescoRuntimeException: 03160000 EHCache configuration failed        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:150)        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1387)        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:244)        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)        … 46 moreCaused by: org.alfresco.error.AlfrescoRuntimeException: 03160000 EHCache configuration failed        at org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean.initCacheManager(InternalEhCacheManagerFactoryBean.java:132)        at org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean.getInstance(InternalEhCacheManagerFactoryBean.java:145)        at org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean.getObject(InternalEhCacheManagerFactoryBean.java:232)        at org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean.getObject(InternalEhCacheManagerFactoryBean.java:64)        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:143)        … 51 moreCaused by: net.sf.ehcache.CacheException: Error configuring from file:/var/lib/tomcat6/webapps/alfresco/WEB-INF/classes/alfresco/ehcache-default.xml. Initial cause was Error configuring from input stream. Initial cause was null:15: Element <defaultCache> does not allow attribute "statistics".        at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:101)        at net.sf.ehcache.CacheManager.parseConfiguration(CacheManager.java:263)        at net.sf.ehcache.CacheManager.init(CacheManager.java:220)        at net.sf.ehcache.CacheManager.<init>(CacheManager.java:187)        at org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean.initCacheManager(InternalEhCacheManagerFactoryBean.java:119)        … 55 moreCaused by: net.sf.ehcache.CacheException: Error configuring from input stream. Initial cause was null:15: Element <defaultCache> does not allow attribute "statistics".        at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:155)        at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:99)        … 59 moreCaused by: org.xml.sax.SAXException: null:15: Element <defaultCache> does not allow attribute "statistics".        at net.sf.ehcache.config.BeanHandler.setAttribute(BeanHandler.java:225)        at net.sf.ehcache.config.BeanHandler.startElement(BeanHandler.java:80)        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)        at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)        at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:153)        … 60 moreApr 16, 2010 2:11:52 PM org.apache.catalina.core.StandardContext startSEVERE: Error listenerStartApr 16, 2010 2:11:52 PM org.apache.catalina.core.StandardContext startSEVERE: Context [/alfresco] startup failed due to previous errorsApr 16, 2010 2:11:52 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbcSEVERE: A web application registered the JBDC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.Apr 16, 2010 2:11:52 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMapSEVERE: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [Prototype beans currently in creation]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.Apr 16, 2010 2:11:52 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMapSEVERE: A web application created a ThreadLocal with key of type [org.springframework.core.NamedThreadLocal] (value [XML bean definition resources currently being loaded]) and a value of type [null] (value [null]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.Apr 16, 2010 2:11:52 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMapSEVERE: A web application created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@e427ed]) and a value of type [org.apache.cxf.bus.CXFBusImpl] (value [org.apache.cxf.bus.CXFBusImpl@f9748f]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.Apr 16, 2010 2:11:54 PM org.apache.catalina.startup.HostConfig deployDescriptorINFO: Deploying configuration descriptor manager.xmlApr 16, 2010 2:11:54 PM org.apache.catalina.startup.HostConfig deployWARINFO: Deploying web application archive share.war14:11:57,188  INFO  [extensions.webscripts.DeclarativeRegistry] Registered 225 Web Scripts (+0 failed), 232 URLs14:11:57,189  INFO  [extensions.webscripts.DeclarativeRegistry] Registered 8 Package Description Documents (+0 failed)14:11:57,189  INFO  [extensions.webscripts.DeclarativeRegistry] Registered 0 Schema Description Documents (+0 failed)14:11:57,233  INFO  [extensions.webscripts.AbstractRuntimeContainer] Initialised Spring Surf Container Web Script Container (in 1220.8962ms)14:11:57,281  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl14:11:57,354  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js14:11:57,416  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl14:11:57,420  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension js14:11:57,482  INFO  [extensions.webscripts.TemplateProcessorRegistry] Registered template processor freemarker for extension ftl14:11:57,486  INFO  [extensions.webscripts.ScriptProcessorRegistry] Registered script processor javascript for extension jsApr 16, 2010 2:11:58 PM org.apache.catalina.startup.HostConfig deployWARINFO: Deploying web application archive cas.war2010-04-16 14:11:59,637 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 0 services.>2010-04-16 14:12:00,201 INFO [org.jasig.cas.util.AutowiringSchedulerFactoryBean] - <Starting Quartz Scheduler now>Apr 16, 2010 2:12:00 PM org.apache.coyote.http11.Http11Protocol startINFO: Starting Coyote HTTP/1.1 on http-8080Apr 16, 2010 2:12:00 PM org.apache.coyote.http11.Http11Protocol startINFO: Starting Coyote HTTP/1.1 on http-8443Apr 16, 2010 2:12:00 PM org.apache.catalina.startup.Catalina startINFO: Server startup in 12974 ms2010-04-16 14:12:19,579 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - <Beginning ticket cleanup.>2010-04-16 14:12:19,581 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - <0 tickets found to be removed.>2010-04-16 14:12:19,581 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - <Finished ticket cleanup.> nested exception is org.alfresco.error.AlfrescoRuntimeException: 03160000 EHCache configuration failed nested exception is org.alfresco.error.AlfrescoRuntimeException: 03160000 EHCache configuration failed2010-04-16 14:13:59,663 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Reloading registered services.>2010-04-16 14:13:59,664 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 0 services.>org.springframework.beans.factory.BeanCreationException2010-04-16 14:15:59,653 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Reloading registered services.>2010-04-16 14:15:59,654 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 0 services.>Error creating bean with name 'qnameEntitySharedCache'2010-04-16 14:17:59,653 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Reloading registered services.>2010-04-16 14:17:59,653 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 0 services.>2010-04-16 14:19:59,654 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Reloading registered services.>2010-04-16 14:19:59,654 INFO [org.jasig.cas.services.DefaultServicesManagerImpl] - <Loaded 0 services.>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Have you got an idea please ?

This morning, it worked without problem, then, I have added some libraries in /WEB-INF/lib, then it was not working at all, ( the same error than in the previous log ), so I delete just the librairies that I had added, but …. the error was still present.

Help me please 😕

PS : sorry for my bad english 😕
5 REPLIES 5

broken
Champ in-the-making
Champ in-the-making
Up help me please, always the same problem ….

broken
Champ in-the-making
Champ in-the-making
Nobody has an idea ? :s

Since 5 days I'm trying lot of things, if you want more information about my work, ask me I will be happy to answer to you.

14:11:52,803  ERROR [web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'qnameEntitySharedCache' defined in class path resource [alfresco/cache-context.xml]: Cannot create inner bean 'org.springframework.cache.ehcache.EhCacheFactoryBean#1a697a1' of type [org.springframework.cache.ehcache.EhCacheFactoryBean] while setting bean property 'cache'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.ehcache.EhCacheFactoryBean#1a697a1' defined in class path resource [alfresco/cache-context.xml]: Cannot resolve reference to bean 'internalEHCacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'internalEHCacheManager': FactoryBean threw exception on object creation; nested exception is org.alfresco.error.AlfrescoRuntimeException: 03160000 EHCache configuration failed

gyro_gearless
Champ in-the-making
Champ in-the-making
I'm not sure if Tomcat will properly clean up after such library changes, so you might try

  • Clean Tomcat's working directory (usually tomcat/work/Catalina/localhost). You may safely delete all of this, as Tomcat will rebuild this directory on next start

  • Clean WEB-INF/lib and fill it with *.jar from a clean Alfresco installation

  • Hope this helps
    Gyro

    broken
    Champ in-the-making
    Champ in-the-making
    Thanks a lot Its "works" again :d

    acommons
    Champ on-the-rise
    Champ on-the-rise
    Thank's for the solution!

    Cleaning the Tomcat working directory was enough to fix the problem in my case.

    I guess the next step is something you should plan for on installation…make a copy of the WEB-INF/lib directory.

    cheers