HTTP状态500 – Servlet [telusko]的内部服务器错误消息Servlet.init()抛出异常

时间:2018-10-26 12:32:37

标签: java spring-mvc

类型异常报告
Servlet [telusko]的消息Servlet.init()引发异常
说明服务器遇到意外状况,阻止其满足请求。

例外 javax.servlet.ServletException:Servlet [telusko]的Servlet.init()抛出异常     org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)     org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)     org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)     org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)     org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:770)     org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1415)     org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)     org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)     java.lang.Thread.run(Thread.java:748) 根本原因

org.springframework.beans.factory.UnsatisfiedDependencyException:创建名称为'indexController'的bean时出错:通过字段'fdao'表示的不满足的依赖关系;嵌套的异常是org.springframework.beans.factory.NoSuchBeanDefinitionException:没有类型为'com.telusko.tusk.dao.FeedbackDao'的合格Bean:应该至少有1个符合自动装配候选条件的bean。依赖项注释:{@ org.springframework.beans.factory.annotation.Autowired(required = true)}     org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor $ AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)     org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)     org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)     org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)     org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)     org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)     org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:306)     org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)     org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)     org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)     org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)     org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)     org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)     org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)     org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)     org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)     org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)     org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)     org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)     javax.servlet.GenericServlet.init(GenericServlet.java:158)     org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)     org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)     org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)     org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)     org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:770)     org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1415)     org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)     org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)     java.lang.Thread.run(Thread.java:748) 根本原因

org.springframework.beans.factory.NoSuchBeanDefinitionException:没有类型为'com.telusko.tusk.dao.FeedbackDao'的合格bean:期望至少有1个有资格作为自动装配候选的bean。依赖项注释:{@ org.springframework.beans.factory.annotation.Autowired(required = true)}     org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1486)     org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104)     org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)     org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor $ AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)     org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)     org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)     org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)     org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)     org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)     org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject(AbstractBeanFactory.java:306)     org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)     org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)     org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)     org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)     org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)     org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)     org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)     org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)     org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)     org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)     org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)     org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)     javax.servlet.GenericServlet.init(GenericServlet.java:158)     org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)     org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)     org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)     org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)     org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)     org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)     org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:770)     org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1415)     org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)     org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)     java.lang.Thread.run(Thread.java:748) 注意服务器日志中提供了根本原因的完整堆栈跟踪。

1 个答案:

答案 0 :(得分:1)

看起来依赖注入框架无法注入某个bean

com.telusko.tusk.dao.FeedbackDao

该类是否有相应注释,例如使用@EJB或@Component(如果使用Spring)?