Discussion:
Cocoon spring configuration dumps loads of exceptions when spring context initialization fails.
Leszek Gawron
2013-03-09 14:02:58 UTC
Permalink
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
Robby Pelssers
2013-03-10 16:33:56 UTC
Permalink
Not sure if this is of any help?

http://stackoverflow.com/questions/5891032/in-a-spring-bean-is-it-possible-to-have-a-shutdown-method-which-can-use-transact

Robby


-----Original Message-----
From: ***@gmail.com [mailto:***@gmail.com] On Behalf Of Leszek Gawron
Sent: Saturday, March 09, 2013 3:03 PM
To: ***@cocoon.apache.org
Subject: Cocoon spring configuration dumps loads of exceptions when spring context initialization fails.

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

Loading...