标题:不知道如何排查了,使用的是SpringMVC和mybatis
只看楼主
liyang220422
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2012-6-15
 问题点数:0 回复次数:6 
不知道如何排查了,使用的是SpringMVC和mybatis
2017-9-3 15:05:14 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.22.
2017-9-3 15:05:14 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].
2017-9-3 15:05:15 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2017-9-3 15:05:15 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2017-9-3 15:05:15 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1346 ms
2017-9-3 15:05:15 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2017-9-3 15:05:15 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.35
2017-9-3 15:05:15 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2017-9-3 15:05:15 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2017-9-3 15:05:15 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2017-9-3 15:05:16 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2017-9-3 15:05:16 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2017-9-3 15:05:16 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2017-9-3 15:05:16 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory mis
2017-9-3 15:05:17 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2017-9-3 15:05:19 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2017-9-3 15:05:19 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2017-9-3 15:05:19 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2017-9-3 15:05:19 org.apache.catalina.startup.Catalina start
信息: Server startup in 3757 ms
2017-9-3 15:05:31 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'springMvc'
2017-9-3 15:05:31 org.apache.catalina.core.ApplicationContext log
严重: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'classroomInfoServiceImp': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [] is defined: expected single matching bean but found 2: [classroomInfoDao, teacherInfoDao]
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:300)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
    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:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
    at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    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.Http11AprProcessor.process(Http11AprProcessor.java:877)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
    at org.apache.tomcat.(AprEndpoint.java:1675)
    at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [] is defined: expected single matching bean but found 2: [classroomInfoDao, teacherInfoDao]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:796)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:431)
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:409)
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:541)
    at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:297)
    ... 28 more
2017-9-3 15:05:31 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet springMvc
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [] is defined: expected single matching bean but found 2: [classroomInfoDao, teacherInfoDao]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:796)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:431)
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:409)
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:541)
    at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
    at org.springframework.context.(CommonAnnotationBeanPostProcessor.java:297)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
    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:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
    at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
    at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    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.Http11AprProcessor.process(Http11AprProcessor.java:877)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
    at org.apache.tomcat.(AprEndpoint.java:1675)
    at java.lang.Thread.run(Thread.java:619)
搜索更多相关主题的帖子: apache 信息 web factory java 
2017-09-03 15:17
calix
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:28
帖 子:249
专家分:1442
注 册:2015-5-4
得分:0 

检查是不是类名写错了
2017-09-03 15:48
liyang220422
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2012-6-15
得分:0 
回复 2楼 calix
不是类名错了,这个可以确定,第一次写项目,有点不太会下手排查错误,最关键的是总感觉自己对异常的理解不对
2017-09-03 17:13
纵横阳仔
Rank: 7Rank: 7Rank: 7
来 自:自学成才的火星人儿
等 级:贵宾
威 望:26
帖 子:147
专家分:698
注 册:2016-10-20
得分:0 
一个接口有两个实现,使用的是@Autowire注释会出错
2017-09-04 09:21
漫步云端24
Rank: 5Rank: 5
等 级:职业侠客
威 望:4
帖 子:47
专家分:347
注 册:2017-4-24
得分:0 
http://www.
http://
应该足以解决你的问题了
2017-09-04 11:21
liyang220422
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2012-6-15
得分:0 
回复 5楼 漫步云端24
谢谢,已经解决
2017-09-04 18:38
liyang220422
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2012-6-15
得分:0 
回复 4楼 纵横阳仔
谢谢,已经解决
2017-09-04 18:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-480454-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.584640 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved