You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Anders Båtstrand (JIRA)" <ji...@apache.org> on 2011/03/28 23:48:05 UTC
[jira] [Created] (CXF-3428) Context closed twice with Spring setup
Context closed twice with Spring setup
--------------------------------------
Key: CXF-3428
URL: https://issues.apache.org/jira/browse/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
Attachments: context-bug.zip
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:
{code}
28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
at org.eclipse.jetty.server.Server.doStop(Server.java:319)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
at Main.main(Main.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
{code}
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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-3428) Context closed twice with Spring
setup
Posted by "Anders Båtstrand (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012918#comment-13012918 ]
Anders Båtstrand commented on CXF-3428:
---------------------------------------
Just to make sure we do not misunderstand each other:
* The error is happening during shutdown.
* The error is also happening with beans and endpoints defined (beans in applicationContext.xml, and endpoint in cxf.xml, as it is in the project I am currently working on).
Best,
Anders
> Context closed twice with Spring setup
> --------------------------------------
>
> Key: CXF-3428
> URL: https://issues.apache.org/jira/browse/CXF-3428
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.2, 2.3.3
> Environment: Windows 7, both Java 5 and 6, and both Jetty 7.3 and Tomcat 7.
> Reporter: Anders Båtstrand
> Assignee: Willem Jiang
> Labels: context, spring
> Attachments: context-bug.zip
>
>
> 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:
> {code}
> 28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
> at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
> at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
> at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
> at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
> at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
> at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
> at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
> at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
> at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
> at org.eclipse.jetty.server.Server.doStop(Server.java:319)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at Main.main(Main.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> {code}
> 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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CXF-3428) Context closed twice with Spring setup
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CXF-3428.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.3.4
> Context closed twice with Spring setup
> --------------------------------------
>
> Key: CXF-3428
> URL: https://issues.apache.org/jira/browse/CXF-3428
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.2, 2.3.3
> Environment: Windows 7, both Java 5 and 6, and both Jetty 7.3 and Tomcat 7.
> Reporter: Anders Båtstrand
> Assignee: Willem Jiang
> Labels: context, spring
> Fix For: 2.3.4
>
> Attachments: context-bug.zip
>
>
> 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:
> {code}
> 28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
> at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
> at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
> at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
> at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
> at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
> at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
> at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
> at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
> at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
> at org.eclipse.jetty.server.Server.doStop(Server.java:319)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at Main.main(Main.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> {code}
> 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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-3428) Context closed twice with Spring
setup
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13013871#comment-13013871 ]
Willem Jiang commented on CXF-3428:
-----------------------------------
@Anders,
I committed a patch into CXF 2.3.x-fixes branch and I also tested the patch with your test case, it should be OK now.
Please check out the CXF 2.3.4-SNAPSHOT for verification.
> Context closed twice with Spring setup
> --------------------------------------
>
> Key: CXF-3428
> URL: https://issues.apache.org/jira/browse/CXF-3428
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.2, 2.3.3
> Environment: Windows 7, both Java 5 and 6, and both Jetty 7.3 and Tomcat 7.
> Reporter: Anders Båtstrand
> Assignee: Willem Jiang
> Labels: context, spring
> Fix For: 2.3.4
>
> Attachments: context-bug.zip
>
>
> 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:
> {code}
> 28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
> at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
> at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
> at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
> at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
> at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
> at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
> at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
> at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
> at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
> at org.eclipse.jetty.server.Server.doStop(Server.java:319)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at Main.main(Main.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> {code}
> 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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CXF-3428) Context closed twice with Spring setup
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang reassigned CXF-3428:
---------------------------------
Assignee: Willem Jiang
> Context closed twice with Spring setup
> --------------------------------------
>
> Key: CXF-3428
> URL: https://issues.apache.org/jira/browse/CXF-3428
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.2, 2.3.3
> Environment: Windows 7, both Java 5 and 6, and both Jetty 7.3 and Tomcat 7.
> Reporter: Anders Båtstrand
> Assignee: Willem Jiang
> Labels: context, spring
> Attachments: context-bug.zip
>
>
> 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:
> {code}
> 28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
> at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
> at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
> at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
> at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
> at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
> at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
> at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
> at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
> at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
> at org.eclipse.jetty.server.Server.doStop(Server.java:319)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at Main.main(Main.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> {code}
> 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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-3428) Context closed twice with Spring
setup
Posted by "Anders Båtstrand (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13013909#comment-13013909 ]
Anders Båtstrand commented on CXF-3428:
---------------------------------------
I tested with the SNAPSHOT, and it is working. Verified {color:green}*OK*{color}.
Thank you for replying and fixing the bug so fast!
> Context closed twice with Spring setup
> --------------------------------------
>
> Key: CXF-3428
> URL: https://issues.apache.org/jira/browse/CXF-3428
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.2, 2.3.3
> Environment: Windows 7, both Java 5 and 6, and both Jetty 7.3 and Tomcat 7.
> Reporter: Anders Båtstrand
> Assignee: Willem Jiang
> Labels: context, spring
> Fix For: 2.3.4
>
> Attachments: context-bug.zip
>
>
> 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:
> {code}
> 28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
> at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
> at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
> at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
> at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
> at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
> at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
> at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
> at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
> at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
> at org.eclipse.jetty.server.Server.doStop(Server.java:319)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at Main.main(Main.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> {code}
> 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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-3428) Context closed twice with Spring
setup
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012824#comment-13012824 ]
Willem Jiang commented on CXF-3428:
-----------------------------------
Hi,
There is no anything in the cxf.xml and applicationContext.xml.
As the BusApplicationListener can't get any bean for an empty application context.
To fix it, we could add a check point in the BusApplicationListener.
Willem
> Context closed twice with Spring setup
> --------------------------------------
>
> Key: CXF-3428
> URL: https://issues.apache.org/jira/browse/CXF-3428
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.2, 2.3.3
> Environment: Windows 7, both Java 5 and 6, and both Jetty 7.3 and Tomcat 7.
> Reporter: Anders Båtstrand
> Labels: context, spring
> Attachments: context-bug.zip
>
>
> 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:
> {code}
> 28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
> at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
> at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
> at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
> at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
> at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
> at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
> at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
> at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
> at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
> at org.eclipse.jetty.server.Server.doStop(Server.java:319)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at Main.main(Main.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> {code}
> 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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CXF-3428) Context closed twice with Spring setup
Posted by "Anders Båtstrand (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anders Båtstrand updated CXF-3428:
----------------------------------
Attachment: context-bug.zip
Added minimal project needed to replicate the error I am getting.
> Context closed twice with Spring setup
> --------------------------------------
>
> Key: CXF-3428
> URL: https://issues.apache.org/jira/browse/CXF-3428
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.2, 2.3.3
> Environment: Windows 7, Java 5 and 6
> Reporter: Anders Båtstrand
> Labels: context, spring
> Attachments: context-bug.zip
>
>
> 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:
> {code}
> 28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
> at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
> at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
> at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
> at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
> at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
> at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
> at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
> at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
> at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
> at org.eclipse.jetty.server.Server.doStop(Server.java:319)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at Main.main(Main.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> {code}
> 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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CXF-3428) Context closed twice with Spring setup
Posted by "Anders Båtstrand (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anders Båtstrand updated CXF-3428:
----------------------------------
Environment: Windows 7, both Java 5 and 6, and both Jetty 7.3 and Tomcat 7. (was: Windows 7, Java 5 and 6)
> Context closed twice with Spring setup
> --------------------------------------
>
> Key: CXF-3428
> URL: https://issues.apache.org/jira/browse/CXF-3428
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.2, 2.3.3
> Environment: Windows 7, both Java 5 and 6, and both Jetty 7.3 and Tomcat 7.
> Reporter: Anders Båtstrand
> Labels: context, spring
> Attachments: context-bug.zip
>
>
> 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:
> {code}
> 28.mar.2011 23:43:15 org.springframework.context.support.AbstractApplicationContext 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.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1079)
> at org.apache.cxf.bus.spring.BusApplicationListener.onApplicationEvent(BusApplicationListener.java:66)
> at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
> at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
> at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1007)
> at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:970)
> at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:378)
> at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:78)
> at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:683)
> at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:143)
> at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:458)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerCollection.doStop(HandlerCollection.java:247)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at org.eclipse.jetty.server.handler.HandlerWrapper.doStop(HandlerWrapper.java:108)
> at org.eclipse.jetty.server.Server.doStop(Server.java:319)
> at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:80)
> at Main.main(Main.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> {code}
> 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 CXF-3213.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira