严重: Error loading WebappClassLoader context:异常的解决方法

使用Eclipse+tomcat6.0,部署项目后,启动报错:

严重: Error loading WebappClassLoader
  context: /springmvc
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@1729854
 org.springframework.web.servlet.DispatcherServlet
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4425)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4738)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2015-12-29 16:47:18 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /springmvc threw load() exception
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1128)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4425)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4738)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)



我的项目用到了用户库,



解决方案:

1、右击项目--》properties


2 点击add


3、点击上图中红线部分

4、添加引用的3个用户库


5、点击 apply---》ok  即可

6、重启,就不会报上面的错了。


一点总结。

参考:http://blog.csdn.net/lucklq/article/details/7621807


你可能感兴趣的:(springmvc)