eclipse里面配置spring,提示java.lang.ClassNotFoundException:org.springframework.web.servlet.Dispatcher错误

在eclipse里面创建了一个Dynamic 项目,用到spring,一直提示java.lang.ClassNotFoundException: org.springframework.web.servlet.Dispatcher 错误,

后来又提示java.lang.NoClassDefFoundError: org/springframework/context/ApplicationConte

后来新建了一个项目,然后结构什么的都没有改变就可以正常运行了;

对比了一下,发现可能的原因有以下几个:

1.lib包不在web-inf文件下面,(这次用这个改掉bug)

2.classes文件夹下面出现了同样的jar

时间: 2025-01-12 09:46:52

eclipse里面配置spring,提示java.lang.ClassNotFoundException:org.springframework.web.servlet.Dispatcher错误的相关文章

SpringMVC Maven项目 java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServle

今天在搭建SpringMVC开发框架时,遇到了一个问题,尽管在maven的POM.xml文件中配置了项目所依赖的jar包,但在启动项目是已然报错如下: 信息: Starting Servlet Engine: Apache Tomcat/7.0.56 十一月 27, 2017 3:19:14 下午 org.apache.catalina.util.SessionIdGenerator createSecureRandom 信息: Creation of SecureRandom instance

Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter

严重: StandardWrapper.Throwableorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested excepti

java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

新建Maven 项目的时候报错: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC

Maven项目Eclipse启动时报错: java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener

Eclipse中启动Maven项目时报如下错误: 严重: Error configuring application listener of class org.springframework.web.util.IntrospectorCleanupListener java.lang.ClassNotFoundException: org.springframework.web.util.IntrospectorCleanupListener at org.apache.catalina.lo

Eclipse启动Maven项目报java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的错误

今天用Eclipse导入了一个Maven项目,启动tomcat时却报java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的错误.   解决办法:右键项目->properties->Deployment Assembly>Add->Java Build Path Entries->Next->Maven Dependencies->Finish.

idea调试SpringMvc, 出现:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误的解决办法

有时,使用idea开发SpringMvc发现调试时出现以下错误: 12-Mar-2017 12:08:02.345 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class org.springframework.web.context.ContextLoaderListene

spring异常 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderServlet

情况1:工程没有添加jar包引用 情况2:(最雷人的错误~)你的工程jar包可能都是引用的,需要把它们手动拷贝到工程里来! 情况3:没有配置spring的映射Bean引用 情况4:spring bean配置的类在当前spring版本中没有

maven项目使用spring报java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListe

1.Add maven dependencies  Right click the web project "properties" -------> click the "Deployment Assembly" ---->Click add button2.Choose Java Build Path Entires ---> click Next3.Choose Maven Dependencies------>  Finish 亲测可

[Spring常见问题]java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

这个问题是因为部署在tomcat下的项目中没有springweb包 但是问题来了,但是我的项目中有呀,maven都引了呀,然后我就懵B啦!看到这个博客我就豁然开朗了:http://my.oschina.net/u/2538370/blog/538518 (1)应该如下图所示,点击项目右键-properties,在如下图所示中配置maven和lib包目录的关联关系