cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rice Yeh (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-1920) net.sf.ehcache.CacheException during hot deployment
Date Tue, 26 Sep 2006 09:11:51 GMT
    [ http://issues.apache.org/jira/browse/COCOON-1920?page=comments#action_12437778 ] 
            
Rice Yeh commented on COCOON-1920:
----------------------------------

After a while of study, I find this issue happens only when I use hibernate with cocoon. If
I change the setting of hibernate to use other cache providers other than ehcache, this issue
is gone. Then I try to trace the code and observe this issue happens because the diskStorePath
used by the hibernate is same as the one for cocoon after hot deployment (before hot deployment,
they are not same). So when trying to configure cache manager for cocoon, a same diskStorePath
has been taken by hibernate and have a  CacheException thrown at line 248 of net.sf.ehcache.CacheManager.
I do not know why hibernate uses the same diskStorePath after hot deployment.

> net.sf.ehcache.CacheException during hot deployment
> ---------------------------------------------------
>
>                 Key: COCOON-1920
>                 URL: http://issues.apache.org/jira/browse/COCOON-1920
>             Project: Cocoon
>          Issue Type: Bug
>          Components: * Cocoon Core
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Rice Yeh
>
> net.sf.ehcache.CacheException always happens during hot deployment in both Tomcat or
Jetty environments. The error message is as follows:
> Caused by: org.springframework.beans.factory.BeanCreationException: Unable to initialize
Avalon component with role org.apache.excalibur.store.Store; nested exception is net.sf.ehcache.CacheException:
Cannot parseConfiguration CacheManager. Attempt to create a new instance of CacheManager using
the diskStorePath "C:\apache\tomcat.home\apache-tomcat-5.5.17\work\Catalina\localhost\xs-school-cocoon\cache-dir\"
which is already used by an existing CacheManager. The source of the configuration was URL
of jar:jndi:/localhost/xs-school-cocoon/WEB-INF/cocoon/lib/cocoon-core-2.2.0-M2-SNAPSHOT.jar!/org/apache/cocoon/components/store/impl/ehcache.xml.
> 	at org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor.postProcessBeforeInitialization(AvalonBeanPostProcessor.java:112)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:268)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:871)
> 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:396)
> 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:240)
> 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:132)
> 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:237)
> 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:153)
> 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:254)
> 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:337)
> 	at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
> 	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
> 	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
> 	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
> 	at org.apache.cocoon.bootstrap.servlet.ShieldingListener.invoke(ShieldingListener.java:151)
> 	... 24 more
> Caused by: net.sf.ehcache.CacheException: Cannot parseConfiguration CacheManager. Attempt
to create a new instance of CacheManager using the diskStorePath "C:\apache\tomcat.home\apache-tomcat-5.5.17\work\Catalina\localhost\xs-school-cocoon\cache-dir\"
which is already used by an existing CacheManager. The source of the configuration was URL
of jar:jndi:/localhost/xs-school-cocoon/WEB-INF/cocoon/lib/cocoon-core-2.2.0-M2-SNAPSHOT.jar!/org/apache/cocoon/components/store/impl/ehcache.xml.
> 	at net.sf.ehcache.CacheManager.configure(CacheManager.java:248)
> 	at net.sf.ehcache.CacheManager.init(CacheManager.java:193)
> 	at net.sf.ehcache.CacheManager.<init>(CacheManager.java:155)
> 	at net.sf.ehcache.CacheManager.create(CacheManager.java:356)
> 	at org.apache.cocoon.components.store.impl.EHDefaultStore.initialize(EHDefaultStore.java:264)
> 	at org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> 	at org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor.postProcessBeforeInitialization(AvalonBeanPostProcessor.java:110)
> 	... 38 more
> Sep 26, 2006 1:52:45 AM org.apache.catalina.core.ApplicationContext log
> INFO: Closing Spring root WebApplicationContext

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message