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: Could not autowire field: private com.sinosoft.framework.service.TransformService com.sinosoft.ecif.service.impl.ECIFCustomerEditServiceImpl.transformService

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transformService‘: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.sinosoft.framework.service.impl.TransformServiceImpl.trasnObject(java.lang.Object); nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [java.lang.Object] is defined: expected single matching bean but found 88:

有一种感觉是这里的问题transformService,但是没找到具体原因,三个项目只要引入了transformService启动就报错,通过同事的帮忙,先是把用到transformService的地方全注释掉,就没有问题了,问题定位到了transformService这里,最后发现在transformServiceImpl里面事项方法上面写了

@Autowired

导致重复注入了,有时间看看autowired的原理在补充.....

时间: 2024-08-27 00:14:48

Error creating bean with name的相关文章

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

Error creating bean with name &#39;menuController&#39;: Injection of autowired dependency……

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

Error creating bean with name &#39;sessionFactory&#39; defined in class path resource [applicationContext.xm

报错信息如下: <span style="font-size:24px;">17:18:32,245 ERROR ContextLoader:307 - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resour

Error creating bean with name &#39;org.springframework.validation.beanvalidation.LocalValidatorFactoryBe

Error creating bean with name 'org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0' Caused by: javax.validation.ValidationException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a pro

Error creating bean with name &#39;org.apache.cxf.binding.soap.customEditorConfigurer&#39;

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 &quot;&quot; Autowiring of fields failed

service类上要有标注,否则会报下面的错.缺少唯一的一个serivce bean. type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception Unable to instantiate Action, orgMgrAction, defined for 'orgMg

Error creating bean with name &#39;security.filter.filterInvocation&#39; defined in URL 报错

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'security.filter.filterInvocatio