条纹错误

时间:2011-03-19 13:25:40

标签: java stripes

我有这个页面:

HTTP Status 404 -

type Status report

message

description The requested resource () is not available.

Apache Tomcat/7.0.11

这是控制台上出现的内容:

SEVERE: Exception starting filter StripesFilter

我勤奋地跟着这个,我能忘记什么? http://www.stripesframework.org/display/stripes/Quick+Start+Guide

我正在使用Tomcat 7.0,Java 1.6.0_24,在Eclipse下使用Dynamic Web Project,这是我的Eclipse版本:

Eclipse Java EE IDE for Web Developers.

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

如果它有一个方位,我使用的是Mac OS X

详细错误消息:

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)

2 个答案:

答案 0 :(得分:3)

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

关于你的链接:

  

部署和运行Stripes你   还需要复制以下内容   Stripes提供的库文件   进入你的类路径:

* commons-logging.jar (1.1)

答案 1 :(得分:2)

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

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