If for some reason spring context creation fails for almost each cocoon bean I get:
ERROR 2013-03-09 14:56.30:271 [org.springframework.beans.factory.support.DefaultListableBeanFactory] Destroy method on bean with name 'configurator:bean-map#14003fc' threw an exception org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'org.apache.cocoon.forms.datatype.convertor.BeanConvertorBuilder/bean': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:212) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.apache.cocoon.spring.configurator.impl.BeanMap.load(BeanMap.java:103) at org.apache.cocoon.spring.configurator.impl.BeanMap.checkInit(BeanMap.java:140) at org.apache.cocoon.spring.configurator.impl.BeanMap.hashCode(BeanMap.java:323) at java.util.concurrent.ConcurrentHashMap.remove(Unknown Source) at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessBeforeDestruction(PersistenceAnnotationBeanPostProcessor.java:357) I have completely NO idea how to fix this without breaking BeanMap hashCode() contract. Can anyone help? -- Leszek Gawron