标签:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘urlMapping‘ defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.myweb.IndexAction] for bean with name ‘IndexAction‘ defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: com.myweb.IndexAction
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.myweb.IndexAction] for bean with name ‘IndexAction‘ defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: com.myweb.IndexAction
很明显是找不到 IndexAction,也就是IndexAction.java生成的IndexAction.class。
指的是Classes路径不对,应该是在 myweb/webapp/WEB-INF/classes/。这是本次错误的原因,这个路径配置错误。
是否在2.3.1 下有对应的文件生成
除了上述两个原因,还可能有别的衍生问题。执行Index.do时,要根据配置找到对应的IndexAction.class。但是现在没有找到,也可以反过来解决,就是配置没有配对。
标签:
原文地址:http://www.cnblogs.com/SimonGao/p/4960928.html