1

I got this page:

HTTP Status 404 -

type Status report

message

description The requested resource () is not available.

Apache Tomcat/7.0.11

This is what appeared on console:

SEVERE: Exception starting filter StripesFilter

I followed this diligently, what could I have forgot? http://www.stripesframework.org/display/stripes/Quick+Start+Guide

I'm using Tomcat 7.0, Java 1.6.0_24, using Dynamic Web Project under Eclipse, this is my Eclipse version:

Eclipse Java EE IDE for Web Developers.

Version: Helios Service Release 1
Build id: 20100917-0705

If it has a bearing, I'm using Mac OS X

Detailed error message:

SEVERE: Exception starting filter StripesFilter
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    at net.sourceforge.stripes.util.Log.getInstance(Log.java:43)
    at net.sourceforge.stripes.controller.StripesFilter.<clinit>(StripesFilter.java:57)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:252)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4542)
    at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5220)
    at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5215)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
4

2 回答 2

3

将 commons-logging.jar 复制到您的 /WEB-INF/lib 目录

关于您的链接:

为了部署和运行 Stripes,您还需要将 Stripes 提供的以下库文件复制到您的类路径中:

* commons-logging.jar (1.1)
于 2011-03-19T14:45:03.710 回答
2

通常,此类问题是由不正确的 web.xml 文件或所需的 JAR 文件不在类路径中引起的。

如果您检查 Tomcat 的日志目录(应该在 CATALINA_HOME/logs 下),您应该会找到一些名为“<hostname>.<date>.log”的日志文件(例如,“localhost.2011-03-18.log”)。在当前日志文件中,您可能会找到一个堆栈跟踪,该堆栈跟踪将提供有关错误确切原因的更多详细信息。

于 2011-03-19T13:50:49.403 回答