码迷,mamicode.com
首页 > 其他好文 > 详细

关于BeanCreationNotAllowedException: Error creating bean with name 'cxf' 的解决心得

时间:2019-10-30 16:38:30      阅读:283      评论:0      收藏:0      [点我收藏+]

标签:val   listen   efi   ali   url   sim   ons   ram   retrieve   

org.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:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
    at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:212)
    at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:86)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:335)
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1059)
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1020)
    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:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
......
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name bdpToEcWebService defined in URL [file:/D:/software/jboss/jboss-4.2.3.GA/server/default/deploy/newztjg.war/WEB-INF/classes/conf/golden/sdp/spring/applicationContext-webservice-sdp.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property fundBalanceService of bean class [com.golden.sdp.webservice.servlet.impl.BdpToEcWebServiceImpl]: Bean property fundBalanceService is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328) ... 148 more Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property fundBalanceService of bean class [com.golden.sdp.webservice.servlet.impl.BdpToEcWebServiceImpl]: Bean property fundBalanceService is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1044) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:904) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1452) ... 156 more

网上没有搜到解决办法,折腾好久
最后静下心来,认认真真的在上面报的错中寻找出路,终于不负苦心人找到了问题所在问题就在于最底下报的这个问题,重复的注册了 fundBalanceService这个service

Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property fundBalanceService of bean class [com.golden.sdp.webservice.servlet.impl.BdpToEcWebServiceImpl]: Bean property fundBalanceService is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1044)
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:904)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1452)
    ... 156 more

找到问题所在就好办了,解决问题,在重新启动  完美成功!

关于BeanCreationNotAllowedException: Error creating bean with name 'cxf' 的解决心得

标签:val   listen   efi   ali   url   sim   ons   ram   retrieve   

原文地址:https://www.cnblogs.com/smile-tianxia/p/11765441.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!