我是靠谱客的博主 冷静鸡翅,最近开发中收集的这篇文章主要介绍配置Spring注入报错,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception
javax.servlet.ServletException: Servlet.init() for servlet MvcController threw exception
 org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
 java.lang.Thread.run(Thread.java:724)

 

root cause
org.springframework.beans.factory.CannotLoadBeanClassException:
Cannot find class [com.gde.rpt.bo.impl.Celcom_ContentDownloadBO] for
 bean with name 'celcomContentDownloadBO' defined in
 ServletContext resource [/WEB-INF/resource/business.xml];
 nested exception is java.lang.ClassNotFoundException: com.gde.rpt.bo.impl.Celcom_ContentDownloadBO
 from [Module "deployment.GDE.war:main" from Service Module Loader]
 org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1061)
 org.springframework.beans.factory.support.AbstractBeanFactory.isBeanClassMatch(AbstractBeanFactory.java:1086)
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:173)
 org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:736)
 org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:403)
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:334)
 org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:311)
 org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:258)
 org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:229)
 org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:115)
 javax.servlet.GenericServlet.init(GenericServlet.java:242)
 org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
 java.lang.Thread.run(Thread.java:724)

 

root cause
java.lang.ClassNotFoundException: com.gde.rpt.bo.impl.Celcom_ContentDownloadBO from [Module "deployment.GDE.war:main" from Service Module Loader]
 org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
 org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
 org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
 org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
 org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
 org.springframework.util.ClassUtils.forName(ClassUtils.java:201)
 org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:321)
 org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1058)
 org.springframework.beans.factory.support.AbstractBeanFactory.isBeanClassMatch(AbstractBeanFactory.java:1086)
 org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:173)
 org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:736)
 org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:403)
 org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:334)
 org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:311)
 org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:258)
 org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:229)
 org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:115)
 javax.servlet.GenericServlet.init(GenericServlet.java:242)
 org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
 java.lang.Thread.run(Thread.java:724)

 

note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.

--------------------------------------------------------------------------------

JBoss Web/7.0.13.Final

 

其实只是配置文件中class名字写错了。更正之后就好了。

最后

以上就是冷静鸡翅为你收集整理的配置Spring注入报错的全部内容,希望文章能够帮你解决配置Spring注入报错所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(44)

评论列表共有 0 条评论

立即
投稿
返回
顶部