caused by:org.springframework.beans.factory.NoSuchBeanDefinitionException_Struts2

Source: Internet
Author: User
Tags addchild session id openssl apache tomcat

1. Error description

Usage:java Org.apache.catalina.startup.Catalina [-config {pathname}] [-nonaming] {-help | start | stop} 2014-7-13  18:02:58 org.apache.catalina.core.AprLifecycleListener init information: Loaded APR based Apache Tomcat Native Library 1.1.29 using
APR version 1.4.8. 2014-7-13 18:02:59 org.apache.catalina.core.AprLifecycleListener init information: APR Capabilities:ipv6 [true], sendfile [true]
, accept filters [FALSE], random [true]. 2014-7-13 18:03:00 org.apache.catalina.core.AprLifecycleListener Initializessl Information: OpenSSL successfully initialized ( OpenSSL 1.0.1e Feb 2013) 2014-7-13 18:03:00 org.apache.coyote.AbstractProtocol init information: initializing Protocolhandler [" http-apr-8686 "] 2014-7-13 18:03:00 org.apache.coyote.AbstractProtocol init information: initializing Protocolhandler [" ajp-apr-8009 "] 2014-7-13 18:03:00 Org.apache.catalina.startup.Catalina Load Information: Initialization processed in 2580 Ms 2014- 7-13 18:03:00 Org.apache.catalina.core.StandardService startinternal information: Starting service Catalina 2014-7-13 18:03:00 org.apache.catalina.core.StandardEngine startinternal information: Starting Servlet Engine:apache tomcat/7.0.53 2014-7-13 18:03:03 org.apache.tomcat.websocket.server.WsSci onstartup information: JSR 356 websocket (Java websocket 1.0) Support I s not available when running on Java 6.  To suppress this message, run Tomcat in Java 7, remove the WebSocket JARs from $CATALINA _home/lib or add the Websocketjars To the Tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA _base/conf/catalina.properties. 
The deprecated Tomcat 7 WebSocket API would be available. 2014-7-13 18:03:03 org.apache.catalina.util.SessionIdGenerator createsecurerandom information: creation of SecureRandom
Instance for session ID generation using [sha1prng] took [144] milliseconds. 2014-7-13 18:03:04 org.apache.catalina.startup.HostConfig deploydirectory information: Deploying Web application Directory D:\ Myeclipse\apache-tomcat-7.0.53\webapps\docs 2014-7-13 18:03:04 Org.apache.catalina.startup.HostConfig Deploydirectory LetterInterest: Deploying Web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\examples 2014-7-13 18:03:05 Org.apache.catalina.core.ApplicationContext Log information: contextlistener:contextinitialized () 2014-7-13 18:03:05 Org.apache.catalina.core.ApplicationContext Log information: sessionlistener:contextinitialized () 2014-7-13 18:03:05 Org.apache.catalina.core.ApplicationContext Log information: contextlistener:attributeadded (' Org.apache.jasper.compiler.TldLocationsCache ', ' org.apache.jasper.compiler.tldlocationscache@3c35fd ') 2014-7-13 18:03:05 org.apache.catalina.startup.HostConfig deploydirectory Information: Deploying Web application Directory D:\MyEclipse\ Apache-tomcat-7.0.53\webapps\firstssh 2014-7-13 18:03:12 org.apache.catalina.core.ApplicationContext log information: No Spring Webapplicationinitializer types detected on classpath 2014-7-13 18:03:12 Org.apache.catalina.core.ApplicationContext log information: initializing Spring root webapplicationcontext 2014-7-13 18:03:12 Org.springframework.web.context.ContextLoader INITwebapplicationcontext information: Root webapplicationcontext:initialization started 2014-7-13 18:03:12 Org.springframework.web.context.support.XmlWebApplicationContext Preparerefresh information: refreshing Root Webapplicationcontext:startup Date [Sun June 18:03:12 CST 2014]; Root of context hierarchy 2014-7-13 18:03:12 Org.springframework.beans.factory.xml.XmlBeanDefinitionReader Loadbeandefinitions information: Loading XML bean Definitions from ServletContext resource [/web-inf/applicationcontext.xml] 2014 -7-13 18:03:13 org.springframework.context.annotation.ClassPathBeanDefinitionScanner registerdefaultfilters Information: JSR-250 ' Javax.annotation.ManagedBean ' found and supported for component scanning 2014-7-13 18:03:13 org.springframework . Beans.factory.config.PropertyPlaceholderConfigurer loadproperties Information: Loading properties file from class path resource
[Jdbc.mysql.properties] 2014-7-13 18:03:14 org.springframework.web.context.ContextLoader initwebapplicationcontext Serious: Context initialization failed ORG.SPRIngframework.beans.factory.BeanCreationException:Error creating Bean with Name ' Studentserviceimpl ': injection of autowired dependencies failed; Nested exception is org.springframework.beans.factory.BeanCreationException:Could not Autowire field:private Com.you.user.dao.StudentDao Com.you.user.service.impl.StudentServiceImpl.studentDao; Nested exception is Org.springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type [  Com.you.user.dao.StudentDao] found for dependency:expected at least 1 bean which qualifies as Autowire Dependency. Dependency annotations: {@org. springframework.beans.factory.annotation.Autowired (Required=true)} at Org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues ( autowiredannotationbeanpostprocessor.java:292) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean ( abstractautowirecapablebeanfactory.java:1139) at org.springFramework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:537) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( abstractautowirecapablebeanfactory.java:475) at org.springframework.beans.factory.support.abstractbeanfactory$1. GetObject (abstractbeanfactory.java:299) at Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:228) at Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:295) at Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:195) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:665) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:760) at Org.springframeworK.context.support.abstractapplicationcontext.refresh (abstractapplicationcontext.java:482) at
	Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:389) At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:294) at Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:106) at Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4973) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5467) at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150) at Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:901) at Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:877) at Org.apache.catalina.core.StandardHost.addChild (standardhost.java:632) at Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:1229) at Org.apache.catalina.stArtup. Hostconfig$deploydirectory.run (hostconfig.java:1875) at Java.util.concurrent.executors$runnableadapter.call ( executors.java:441) at Java.util.concurrent.futuretask$sync.innerrun (futuretask.java:303) at Java.util.concurrent.FutureTask.run (futuretask.java:138) at java.util.concurrent.threadpoolexecutor$ Worker.runtask (threadpoolexecutor.java:886) at Java.util.concurrent.threadpoolexecutor$worker.run ( threadpoolexecutor.java:908) at Java.lang.Thread.run (thread.java:619) caused by: Org.springframework.beans.factory.BeanCreationException:Could not Autowire field:private Com.you.user.dao.StudentDao Com.you.user.service.impl.StudentServiceImpl.studentDao; Nested exception is Org.springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type [  Com.you.user.dao.StudentDao] found for dependency:expected at least 1 bean which qualifies as Autowire Dependency. Dependency annotations: {@org. springframework.beans.factory.annotation.Autowired (reqUired=true)} at org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$ Autowiredfieldelement.inject (autowiredannotationbeanpostprocessor.java:505) at Org.springframework.beans.factory.annotation.InjectionMetadata.inject (injectionmetadata.java:87) at Org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues ( autowiredannotationbeanpostprocessor.java:289) ... More caused By:org.springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type [  Com.you.user.dao.StudentDao] found for dependency:expected at least 1 bean which qualifies as Autowire Dependency. Dependency annotations: {@org. springframework.beans.factory.annotation.Autowired (Required=true)} at Org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException ( defaultlistablebeanfactory.java:1051) at Org.springframework.beans.factory.support.DefaultListableBeanFactoRy.doresolvedependency (defaultlistablebeanfactory.java:919) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency ( defaultlistablebeanfactory.java:820) at Org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject (autowiredannotationbeanpostprocessor.java:477) ... More 2014-7-13 18:03:14 org.apache.catalina.core.StandardContext Listenerstart Serious: Exception Sending context
Initialized event to listener instance of class Org.springframework.web.context.ContextLoaderListener Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' Studentserviceimpl ': Injection of autowired dependencies failed; Nested exception is org.springframework.beans.factory.BeanCreationException:Could not Autowire field:private Com.you.user.dao.StudentDao Com.you.user.service.impl.StudentServiceImpl.studentDao; Nested exception is Org.springframework.beans.factory.NoSuchBeanDefinitionExceptioN:no qualifying Bean of type [Com.you.user.dao.StudentDao] found for dependency:expected at least 1 beans which As Autowire candidate for this dependency. Dependency annotations: {@org. springframework.beans.factory.annotation.Autowired (Required=true)} at Org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues ( autowiredannotationbeanpostprocessor.java:292) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean ( abstractautowirecapablebeanfactory.java:1139) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:537) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( abstractautowirecapablebeanfactory.java:475) at org.springframework.beans.factory.support.abstractbeanfactory$1. GetObject (abstractbeanfactory.java:299) at Org.springframework.beans.factory.support.DefaultSIngletonbeanregistry.getsingleton (defaultsingletonbeanregistry.java:228) at Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:295) at Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:195) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:665) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:760) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:482) at
	Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:389) At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:294) at Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:106) at Org.apAche.catalina.core.StandardContext.listenerStart (standardcontext.java:4973) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5467) at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150) at Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:901) at Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:877) at Org.apache.catalina.core.StandardHost.addChild (standardhost.java:632) at Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:1229) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (hostconfig.java:1875) at Java.util.concurrent.executors$runnableadapter.call (executors.java:441) at java.util.concurrent.futuretask$ Sync.innerrun (futuretask.java:303) at Java.util.concurrent.FutureTask.run (futuretask.java:138) at Java.util.concurrent.threadpoolexecutor$worker.runtask (threadpoolexecutor.java:886) at Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:908) at Java.lang.Thread.run (thread.java:619) caused by: Org.springframework.beans.factory.BeanCreationException:Could not Autowire field:private Com.you.user.dao.StudentDao Com.you.user.service.impl.StudentServiceImpl.studentDao; Nested exception is Org.springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type [  Com.you.user.dao.StudentDao] found for dependency:expected at least 1 bean which qualifies as Autowire Dependency. Dependency annotations: {@org. springframework.beans.factory.annotation.Autowired (Required=true)} at Org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject (autowiredannotationbeanpostprocessor.java:505) at Org.springframework.beans.factory.annotation.InjectionMetadata.inject (injectionmetadata.java:87) at Org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues ( Autowiredannotationbeanpostprocessor. java:289) ... More caused By:org.springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type [  Com.you.user.dao.StudentDao] found for dependency:expected at least 1 bean which qualifies as Autowire Dependency. Dependency annotations: {@org. springframework.beans.factory.annotation.Autowired (Required=true)} at Org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException ( defaultlistablebeanfactory.java:1051) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency ( defaultlistablebeanfactory.java:919) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency ( defaultlistablebeanfactory.java:820) at Org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject (autowiredannotationbeanpostprocessor.java:477) ... More 2014-7-13 18:03:14 Com.sun.faces.config.ConfigureListener conTextinitialized Information: Initialize the context '/firstssh ' Mojarra 2.0.3 (FCS b03) 2014-7-13 18:03:14 Ctory CreateInstance Information: JSF1048: There are Postconstruct/predestroy annotations.
The Managedbeans method marked with these annotations will indicate that the annotation has been processed. 2014-7-13 18:03:15 org.apache.catalina.core.StandardContext startinternal serious: Error listenerstart 2014-7-13 18:03:15 Org.apache.catalina.core.StandardContext startinternal Serious: Context [/FIRSTSSH] startup failed due to previous errors 2014 -7-13 18:03:15 org.apache.catalina.core.ApplicationContext Log information: Closing Spring root Webapplicationcontext 2014-7-13 18:03:15 Org.apache.catalina.loader.WebappClassLoader Checkthreadlocalmapforleaks Severe: The Web application [/FIRSTSSH] Created a ThreadLocal with key of type [com.sun.faces.util.util$1] (value [com.sun.faces.util.util$1@d8355]) and a value O F Type [JAVA.UTIL.HASHMAP] (value [{com.sun.faces.patterncache={=}}]) but failed to remove it when the Web application W As stopped. Threads are going to is renewed over time to try and Avoid a probable memory leak. 2014-7-13 18:03:15 org.apache.catalina.startup.HostConfig deploydirectory information: Deploying Web application Directory D:\ Myeclipse\apache-tomcat-7.0.53\webapps\host-manager 2014-7-13 18:03:15 Org.apache.catalina.startup.HostConfig Deploydirectory Information: Deploying Web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\manager 2014-7-13 18:03:15 org.apache.catalina.startup.HostConfig deploydirectory Information: Deploying Web application Directory D:\MyEclipse\ Apache-tomcat-7.0.53\webapps\root 2014-7-13 18:03:15 org.apache.coyote.AbstractProtocol start information: Starting Protocolhandler ["http-apr-8686"] 2014-7-13 18:03:15 org.apache.coyote.AbstractProtocol start information: Starting Protocolhandler ["ajp-apr-8009"] 2014-7-13 18:03:15 org.apache.catalina.startup.Catalina start information: Server startup in
 14979 ms

2. Error reason

Added a paragraph to the applicationcontext.xml:

<bean id= "Studentserviceimpl" class= "Com.you.user.service.impl.StudentServiceImpl" scope= "Singleton" lazy-init= "False" >
<property name= "Studentdao" ref= "Studentdaoimpl"/>
</bean>


3. Solutions

Get rid of this part.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.