CXF+Spring启动不了
我用CXF+Spring发布一个webservice,启动时怎么总是提示单例问题?
2013-7-18 16:02:54 org.springframework.context.support.AbstractApplicationContext doClose
警告: Exception thrown from ApplicationListener handling ContextClosedEventorg.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'cxf': 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:210)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:155)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:86)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
at org.apache.cxf.bus.spring.SpringBus.destroyBeans(SpringBus.java:100)
at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:196)
at org.apache.cxf.bus.CXFBusImpl.shutdown(CXFBusImpl.java:178)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
谢谢,经过我一下午不断的测试,发现原来是其它的bean没有配置好。比较郁闷的是,真正引起异常的地方显示在最后。
先查查版本问题,如果还是不行,就看看CXF配置文件加载,如果用的是spring mvc的话 尝试在springmvc配置文件中加载cxf配置文件 不在web.xml文件中加载,如果还不行 联系我 帮你远程看看
自己实现的destory方法吗?