`
amanhu
  • 浏览: 13032 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

严重 exception starting filter struts2 unable to load configuration.

 
阅读更多

myeclipse6.0+tomcat6.0+jdk1.5+struts 2.1.6

1.类库包:

commons-logging-1.0.4.jar

freemarker-2.3.13.jar

ognl-2.6.11.jar

struts2-core-2.1.6.jar

xwork-2.1.2.jar

2web.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app>

<display-name>first Struts 2 Project</display-name>

<filter>

<filter-name>struts2</filter-name>

<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>

</filter>

<filter-mapping>

<filter-name>struts2</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

</web-app>

3index.jsp

<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags" %>

<h1>HelloWorld</h1>

就以上几个文件,在启动Tomcat时老是报异常如下:

2009-5-13 10:32:41 org.apache.catalina.core.AprLifecycleListener init

信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:/Program Files/MyEclipse 6.0/bin;E:/Program Files/Apache Software Foundation/Tomcat 6.0/bin

2009-5-13 10:32:41 org.apache.coyote.http11.Http11Protocol init

信息: Initializing Coyote HTTP/1.1 on http-8080

2009-5-13 10:32:41 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 1166 ms

2009-5-13 10:32:41 org.apache.catalina.core.StandardService start

信息: Starting service Catalina

2009-5-13 10:32:41 org.apache.catalina.core.StandardEngine start

信息: Starting Servlet Engine: Apache Tomcat/6.0.13

2009-5-13 10:32:43 org.apache.catalina.core.ApplicationContext log

信息: ContextListener: contextInitialized()

2009-5-13 10:32:43 org.apache.catalina.core.ApplicationContext log

信息: SessionListener: contextInitialized()

2009-5-13 10:32:47 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts-default.xml]

2009-5-13 10:32:47 org.apache.catalina.core.StandardContext filterStart

严重: Exception starting filter struts2

Unable to load configuration. - bean - jar:file:/E:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/StudyJ2EE/WEB-INF/lib/struts2-core-2.1.6.jar!/struts-default.xml:46:178

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)

at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)

at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)

at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)

at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:516)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:566)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Caused by: Unable to load bean: type:org.apache.struts2.dispatcher.multipart.MultiPartRequest class:org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest - bean - jar:file:/E:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/StudyJ2EE/WEB-INF/lib/struts2-core-2.1.6.jar!/struts-default.xml:46:178

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:222)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:165)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)

... 30 more

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/RequestContext

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)

at java.lang.Class.getDeclaredConstructors(Unknown Source)

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:212)

... 33 more

2009-5-13 10:32:47 org.apache.catalina.core.StandardContext start

严重: Error filterStart

2009-5-13 10:32:47 org.apache.catalina.core.StandardContext start

严重: Context [/StudyJ2EE] startup failed due to previous errors

2009-5-13 10:32:48 org.apache.coyote.http11.Http11Protocol start

信息: Starting Coyote HTTP/1.1 on http-8080

2009-5-13 10:32:48 org.apache.jk.common.ChannelSocket init

信息: JK: ajp13 listening on /0.0.0.0:8009

2009-5-13 10:32:48 org.apache.jk.server.JkMain start

信息: Jk running ID=0 time=0/72 config=null

2009-5-13 10:32:48 org.apache.catalina.startup.Catalina start

信息: Server startup in 6899 ms

解决方法:

由于类库中缺少:commons-fileupload-1.2.1.jar

加上,一切将变得正常

分享到:
评论

相关推荐

    SSH2报错xception starting filter struts2

    严重: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

    struts2-core-2.1.8.1 xwork-core-2.1.6源码

    4. **配置管理(Configuration Manager)**:Struts2的配置管理器负责读取配置文件(如struts.xml),并将配置信息加载到内存中。这部分代码主要位于`com.opensymphony.xwork2.config`包下,包括`Configuration`接口...

    解决Hive启动失败Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

    FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient 通过控制台的...

    Tomcat部署项目时报错解决方案

    严重: Exception starting filter struts2 Unable to load configuration. - [unknown location] ``` 该错误提示通常伴随着一系列的堆栈跟踪信息,指向了问题的具体原因。例如,在提供的部分内容中可以看到以下堆栈...

    Unalbe to load DLL 不能加载dll解决思路

    Unalbe to load DLL:由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。(Exception from HRESULT:0x800736B1). 解决思路。

    Struts框架中struts-config.xml文件配置小结

    &lt;exception className="org.apache.struts.config.ExceptionConfig" handler="org.apache.struts.action.ExceptionHandler" key="login.error" path="/error.jsp"&gt; &lt;/exception&gt; ``` #### 四、其他元素简介 ...

    struts2校验框架使用心得.txt

    &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;url-pattern&gt;/* &lt;/...

    struts2入门配置手把手教.doc

    - **安装配置**:与Struts1不同的是,Struts2的入口点是一个Filter而非Servlet,因此在`web.xml`中需要配置Filter。 ```xml &lt;filter&gt; &lt;filter-name&gt;struts2&lt;/filter-name&gt; &lt;filter-class&gt; org.apache.struts2....

    starting-struts2-chinese.rar

    这个"starting-struts2-chinese.rar"压缩包文件包含了一份中文版的"starting-struts2-chinese.pdf"文档,很显然是为帮助初学者理解和入门Struts2框架而准备的。 Struts2的核心是模型-视图-控制器(MVC)设计模式,...

    Struts2全部jar包

    Struts2是一个强大的MVC(模型-视图-控制器)框架,它在Java Web开发中广泛应用,为开发者提供了构建可维护、可扩展的Web应用程序的结构。本资源包含的"Struts2全部jar包"是搭建Struts2项目的基础,确保了所有必要的...

    struts2的token实现.

    Struts2是一个非常流行的Java Web框架,用于构建和维护可扩展且易于管理的企业级应用程序。在Web表单提交中,防止重复提交是一个常见的需求,而Struts2的Token机制就是为了应对这一问题而设计的。Token机制能确保...

    Struts2配置精要之struts.xml( global和default的配置)

    Struts2是一个强大的MVC(模型-视图-控制器)框架,用于构建Java Web应用程序。在Struts2中,`struts.xml`是核心配置文件,它定义了应用的架构,包括动作映射、结果类型、拦截器和全局配置等。这篇博客主要探讨的是`...

    struts2 chm 帮助文档

    StrutsConstants This class provides a central location for framework configuration keys used to retrieve and store Struts configuration settings. 异常错误概要 异常错误 说明 StrutsException A ...

    struts2-upLoad-photo.rar_photo upload_struts2

    Struts2是一个强大的MVC(模型-视图-控制器)框架,被广泛应用于Java Web开发中,用于构建可维护性和可扩展性高的企业级应用程序。本文将深入探讨如何使用Struts2实现图片上传和显示的功能。 一、Struts2图片上传...

    Struts常见错误及原因分析.

    ### Struts常见错误及原因分析 #### 一、异常 javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login **异常描述**: 该异常通常出现在尝试访问一个未在`struts-config.xml`文件中正确配置...

    解决checkstyle出现的问题:Got an exception - java.lang.RuntimeException Unable to get class information for Exception

    ${module-exception.jar.path}"/&gt; &lt;formatter type="xml" tofile="${report.checkstyleReport.xml}"/&gt; ${project.src}" includes="*/.java"/&gt; ``` 4. **测试并验证:** 修改后,重新执行构建脚本,并...

    struts实现多文件上传1.txt

    "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN" "http://struts.apache.org/dtds/struts-2.3.dtd"&gt; &lt;struts&gt; &lt;constant name="struts.devMode" value="true"/&gt; ...

    Struts2的DTD配置文件struts-2.3.dtd

    Struts2是一个流行的Java web应用程序框架,用于构建和维护可扩展、模块化和高度交互性的MVC(模型-视图-控制器)应用。在Struts2中,`struts.xml`是核心配置文件,它定义了应用的行为、动作、结果和其他组件。为了...

Global site tag (gtag.js) - Google Analytics