cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders B├ątstrand (JIRA) <>
Subject [jira] [Created] (CXF-3428) Context closed twice with Spring setup
Date Mon, 28 Mar 2011 21:48:05 GMT
Context closed twice with Spring setup

                 Key: CXF-3428
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.3.3, 2.3.2
         Environment: Windows 7, Java 5 and 6
            Reporter: Anders B├ątstrand

See the enclosed project (very minimal).

I have a cxf.cml and an applicationContext.xml, and loads both using ContextLoaderListener
in my web.xml. I have also a CXFServlet. Starting this with Jetty, I get the following exception
when I stop the server:

28.mar.2011 23:43:15 doClose
WARNING: Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh'
before accessing beans via the ApplicationContext
	at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(
	at org.springframework.web.context.ContextLoader.closeWebApplicationContext(
	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(
	at org.eclipse.jetty.server.handler.ContextHandler.doStop(
	at org.eclipse.jetty.servlet.ServletContextHandler.doStop(
	at org.eclipse.jetty.webapp.WebAppContext.doStop(
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(
	at org.eclipse.jetty.server.handler.HandlerCollection.doStop(
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(
	at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(
	at org.eclipse.jetty.server.Server.doStop(
	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(
	at Main.main(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(

To replicate, simply run the Main method in the attached project. Then switch the CXF version
in the pom.xml, and see it works with version 2.3.1. I therefore thinks this is related to

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message