Hi-
I believe Dan has applied some fixes to do with the shutdown process
causing the creation of beans, just don;t recall what exactly was it -
but that may've been fixed, at least on the trunk
Cheers, Sergey
On 21/09/11 02:42, Dan King wrote:
When I deploy my application war file to tomcat, I get the following warning
and error messages in the tomcat log file. Does anyone know what is the cause
and how to solve it? Below the warning/error messages are my context
configuration files -- context-service.xml and context-persistence.xml.
[WARN] Invocation of destroy method 'shutdown' failed on bean with name 'cxf'
org.springframework.beans.factory.BeanCreationNotAllowedException: Error
creating bean with name 'entityManagerFactory': 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!)
org.springframework.web.context.ContextLoader [ERROR] Context initialization
failed.
context-services.xml:
<beans>
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<jaxrs:server id="facilerWebService" address="/">
<jaxrs:serviceBeans>
<ref bean="imageService"/>
<ref bean="profileService"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jsonProvider"/>
</jaxrs:providers>
</jaxrs:server>
</beans>
context-persistence.xml:
<beans>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="${persistence.unit}"/>
<property name="dataSource" ref="pooledDs"/>
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="databasePlatform"
value="org.hibernate.dialect.MySQLDialect"/>
<property name="showSql" value="false"/>
<property name="generateDdl" value="false"/>
</bean>
</property>
</bean>
</beans>