我应该怎么做这个NoClassDefFoundError?

时间:2014-02-10 07:14:50

标签: apache tomcat struts2 noclassdeffounderror classnotfoundexception

INFO: validateJarFile(C:\Users\smart\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ konzernauto1\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Feb 10, 2014 12:40:20 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: com/opensymphony/xwork2/config/FileManagerProvider
    at org.apache.struts2.dispatcher.Dispatcher.init_FileManager(Dispatcher.java:352)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:481)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.config.FileManagerProvider
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    ... 15 more

1 个答案:

答案 0 :(得分:0)

INFO消息简单告诉您Tomcat没有从您的应用程序加载Servlet API,因为它存在两次或不是正确的版本。 SEVERE消息告诉您在类路径中缺少一个类(NoClassDefFoundError)。该类名为FileManagerProvider,包含在“xwork-core.jar”中。