这是是什么错误?原理是怎么回事?

JavaOlder 发布于 2012/11/13 12:01
阅读 2K+
收藏 0
[com.opensymphony.xwork2.util.InstantiatingNullHandler][DEBUG][2012-11-13 12:00:36][Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@796e1c], property=struts]]
[com.opensymphony.xwork2.DefaultActionProxy][DEBUG][2012-11-13 12:00:36][Creating an DefaultActionProxy for namespace / and action name index]
[org.apache.struts2.dispatcher.ActionContextCleanUp][DEBUG][2012-11-13 12:00:36][skipping cleanup counter=1]
2012-11-13 12:00:36 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet default threw exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.share.barter.data.services.BarterService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:920)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:789)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
 at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:283)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:374)
 at com.opensymphony.xwork2.spring.SpringObjectFactory.autoWireBean(SpringObjectFactory.java:168)
 at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:155)
 at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:129)
 at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:143)
 at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:113)
 at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:275)
 at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:365)
 at com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)
 at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:83)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:74)
 at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
 at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
 at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 at java.lang.Thread.run(Thread.java:619)
[com.opensymphony.xwork2.util.InstantiatingNullHandler][DEBUG][2012-11-13 12:00:41][Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@796e1c], property=org]]
[org.apache.struts2.dispatcher.ActionContextCleanUp][DEBUG][2012-11-13 12:00:41][skipping cleanup counter=1]
[com.opensymphony.xwork2.util.InstantiatingNullHandler][DEBUG][2012-11-13 12:00:41][Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@796e1c], property=struts]]
[com.opensymphony.xwork2.DefaultActionProxy][DEBUG][2012-11-13 12:00:41][Creating an DefaultActionProxy for namespace / and action name index]
[org.apache.struts2.dispatcher.ActionContextCleanUp][DEBUG][2012-11-13 12:00:41][skipping cleanup counter=1]
2012-11-13 12:00:41 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet default threw exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.share.barter.data.services.BarterService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:920)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:789)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
 at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:283)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:374)
 at com.opensymphony.xwork2.spring.SpringObjectFactory.autoWireBean(SpringObjectFactory.java:168)
 at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:155)
 at com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:129)
 at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:143)
 at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:113)
 at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:275)
 at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:365)
 at com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)
 at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:83)
 at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
 at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:74)
 at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)
 at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:494)
 at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
 at java.lang.Thread.run(Thread.java:619)
加载中
0
喜之郎
喜之郎
@Autowire默认按类型注入,异常是说找不找类型为 com.share.barter.data.services.BarterService的bean,可能是因为这个类上面没加@Component注解。
JavaOlder
JavaOlder
@Component注解 应该怎么加?这个是什么含义?先谢谢你!
返回顶部
顶部