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

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' 的解决心得

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

时间: 2024-08-28 06:48:19

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

BeanCreationException: Error creating bean with name 'classPathFileSystemWatcher'之解决办法

错误关键信息: BeanCreationException: Error creating bean with name 'classPathFileSystemWatcher' 错误原因:Idea不支持热加载,application-test.yml中的热加载配置去除后,就能正常启动了,对应的服务也能正常访问. 解决办法:去除热加载中的代码配置,如可修改为这样: devtools: restart: enabled: true # additional-paths: src/main/java

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext之解决办法

错误产生背景:将之前用Eclipse写的Blog项目迁移到Idea上面.Ecilpse项目一直是没有问题的. 错误原因分析:原因是项目依赖中引入的jpa,另外也与Idea比较智能也有关系 解决办法: 第一,在启动类中加上如下注解代码 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,JpaRepositoriesAutoConfiguration.class,HibernateJpaAutoConfigurat

Error creating bean with name 'eurekaAutoServiceRegistration'

spring-boot项目不断重启,报错: 1 org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaAutoServiceRegistration': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not

Error creating bean with name 'org.apache.cxf.binding.soap.customEditorConfigurer'

1.错误描述 2015-09-20 17:08:36 [localhost-startStop-1] WARN org.apache.cxf.bus.spring.BusApplicationContext - Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error

Error creating bean with name 'org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration

Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration': Initialization of bean failed; nested exception

Error creating bean with name

今天碰到一个特别奇怪的问题: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ecfCustomerEditService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: C

Error creating bean with name 'memcachedClient'...java.lang.OutOfMemoryError

1,Tomcat启动报错如下: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'memcachedClient' defined in file [/usr/local/apache-tomcat-6.0.37_6500/webapps/trade_service/WEB-INF/classes/META-INF/spring/springCont

Error creating bean with name 'menuController': Injection of autowired dependency……

出现了一大串错误 Error creating bean with name 'userController': Injection of autowired dependencies failed..... 查了代码后发现,原来是在UserServiceImpl中忘了写一句话@Service("userService"),以至于因此导致一系列错误. 在控制层调用业务层,必须在业务层先进行注解: @Service("userService"); 然后在控制层注入业务

Java AOP nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice || Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' 两个异常解决办法

贴出applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://ww