1.NoClassDefFoundError: org/springframework/context/event/EventListenerFactory
spring的jar包不一致或者确实包。
2.java.lang.IncompatibleClassChangeError :
class org.springframework.core.type.classreading.ClassMetadataReadingVisitor
has interface org.springframework.asm.ClassVisitor as super class
spring.core包和spring.asm包冲突 ,去掉一个。
3.No mapping found for HTTP request with URI… in DispatcherServlet with name
spring-servlet.xml添加 <
mvc:default-servlet-handler/>
4.”mvc:annotation-driven” 的前缀 “mvc”未绑定
没有引入了命名空间。在xml的beans里面加入如下代码即可
xmlns:mvc="http://www.springframework.org/schema/mvc"
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
5.java.lang.NoClassDefFoundError: org/springframework/context/ConfigurableApplicationContext 或
Error configuring application listener of class org.springframework.web.context
如果Eclipse的BuildPath里面不缺jar包并且在 ProjectProperties>>DeploymentAssembly里面定义的lib都包含齐全,那么有可能jar包没有被deploy到tomcat里面路径可能是:\WorkSpace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\ProjectNameXXX\WEB-INF\lib。手动将jar包扔进去可解决tomcat报”NoClassDefFoundError”错误。