`

Unable to load bean org.apache.struts2.dispatcher.

阅读更多
后台报错日志:
02:40:11,646 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/webapp].[default]] Servlet.service() for servlet default threw exception
java.lang.RuntimeException: Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location]
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:136)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:476)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:486)
at com.opensymphony.xwork2.inject.ContainerImpl$10.call(ContainerImpl.java:517)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:542)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:515)
at org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:702)
at org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWrapRequest(FilterDispatcher.java:330)
at com.sailing.framework.struts2.dispatcher.SailingFilterDispatcher.doFilter(SailingFilterDispatcher.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at com.sailing.framework.components.security.acegi.DBUserGroupFilterHandler.doFilter(DBUserGroupFilterHandler.java:102)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Caused by: Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location]
at org.apache.struts2.config.BeanSelectionProvider$ObjectFactoryDelegateFactory.create(BeanSelectionProvider.java:246)
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:134)
... 60 more
02:40:11,646 ERROR [/webapp/mobileNewspaper/saveOrUpdateMmsInfo.action] Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location]
java.lang.RuntimeException: Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location]
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:136)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:476)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:486)
at com.opensymphony.xwork2.inject.ContainerImpl$10.call(ContainerImpl.java:517)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:542)
at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:515)
at org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:702)
at org.apache.struts2.dispatcher.FilterDispatcher.prepareDispatcherAndWrapRequest(FilterDispatcher.java:330)
at com.sailing.framework.struts2.dispatcher.SailingFilterDispatcher.doFilter(SailingFilterDispatcher.java:55)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at com.sailing.framework.components.security.acegi.DBUserGroupFilterHandler.doFilter(DBUserGroupFilterHandler.java:102)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Caused by: Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location]
at org.apache.struts2.config.BeanSelectionProvider$ObjectFactoryDelegateFactory.create(BeanSelectionProvider.java:246)
at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:134)
... 60 more

页面jsp代码:
[color=blue]
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="buttonarea">
    <tr>
	    <td>
		    <sit:perm perms="mobileNewspaper.savebutton">   
		    	<sit:button type="baocun" onclick='save(document.MmsNewspaper,"?columnsId=${columnsId }")'/>
			</sit:perm>
		    	<sit:button type="fanhui" onclick="goBack()"/> 
		</td>
    </tr>
</table>
<form id="MmsNewspaper" name="MmsNewspaper" method="post" [color=darkred]enctype="multipart/form-data"[/color]>
<c:if test="${mmsNewspaper.id == null}"></c:if>
<c:if test="${mmsNewspaper.id != null}">
	<input name="mmsNewspaper.id" type="hidden" value="${mmsNewspaper.id}">
</c:if>

<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1">
	<tr>
	<td>
	<table  border="0" width="98%" cellspacing="1" cellpadding="0" class="formtable">
	  <tr>
	    <td class="itemtdmust" width="15%">文章名称:</td>
	    <td colspan="3"><input type="text" name="mmsNewspaper.mmsTitle" maxlength="50" class="autoinput" datatype="Require" msg="文章名称不能为空!" value="${mmsNewspaper.mmsTitle }"/></td>
	  </tr>
	  <tr>
	    <td class="itemtd" width="15%">文章内容:</td>
	    <td colspan="3" ><textarea id="descr" name="mmsNewspaper.mmsContent" rows="5" class="autoinput" type="_moz">${mmsNewspaper.mmsContent }</textarea></td>
	  </tr>
	</table>
	</td>
	</tr>
	<!-- <tr>
		<td width="100%" height="18" align="left" bgcolor="ECF5FF"><font color="#FF0000">附件上传&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(注:所上传的附件总大小不得超过50k)</font></td>
	</tr>	 -->
	</table>	
</form>
[/color]

解决方法:
由于页面中加入了” enctype="multipart/form-data"“ ,该设置是用来确保匿名上载文件的正确编码。
之前页面是用来上传附件的,后来将附件上传取消,但忘记删除该句代码了,导致页面报错,删除该句代码即问题解决。
分享到:
评论
1 楼 fireinjava 2010-01-26  
我碰到是少了Struts.properties也提示这样。。。
在此记录下哈哈
好怪。

相关推荐

    org.apache.struts2.dispatcher.FilterDispatcher

    总的来说,`org.apache.struts2.dispatcher.FilterDispatcher`是Struts 2框架中一个至关重要的组件,负责请求的分发和Action的调用,对于理解和掌握Struts 2的运行机制具有重要意义。开发者需要熟悉其工作原理和配置...

    struts 2.2 api文档

    org.apache.struts2, org.apache.struts2.components, org.apache.struts2.components.template, org.apache.struts2.config, org.apache.struts2.dispatcher, org.apache.struts2.dispatcher.mapper, org.apache....

    commons-fileupload-1.2.1.jar commons-io-1.4.jar

    Struts2本身没有自带的两个jar 如果不导入的话会有Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location]异常

    tomcat报错Unable to find 'struts multipart saveDir解决

    标题中的“tomcat报错Unable to find 'struts multipart saveDir'”是一个常见的问题,通常出现在使用Apache Struts框架,并且在处理multipart/form-data类型的请求时。这种类型的请求通常用于上传文件,而`saveDir`...

    Struts课堂笔记.rar--struts2的struts.properties配置文件详解

    The org.apache.struts2.dispatcher.multipart.MultiPartRequest parser implementation for a multipart request (file upload) 专为multipart请求信息使用的org.apache.struts2.dispatcher.multipart....

    struts 2.3.4.1 最新英文版API

    org.apache.struts2.dispatcher.ng This package contains a reimagining of the traditional Struts filter dispatchers. org.apache.struts2.dispatcher.ng.filter org.apache.struts2.dispatcher.ng.listener ...

    struts2上传必备jar包,避免出现struts2的升级漏洞!自己吃亏后分享

    at org.apache.struts2.dispatcher.Dispatcher.cleanUpRequest(Dispatcher.java:837) at org.apache.struts2.dispatcher.ng.PrepareOperations.cleanupRequest(PrepareOperations.java:103) at org.apache.struts2....

    struts2-core-2.0.11源码

    8. **请求处理(Request Handling)**:`org.apache.struts2.dispatcher.ng.filter`包中的`StrutsPrepareAndExecuteFilter`是Struts2与Servlet容器交互的关键,它负责准备请求并执行Action。 9. **类型转换(Type ...

    Struts2.5.2的配置及问题解决

    在http://struts.apache.org/download.cgi#struts252上,你可以找到两个选项:1是指包含了所有必需和可选组件的完整包,而2则是仅包含核心组件的最小化包。通常,为了确保所有功能都能正常工作,开发者会选择下载1,...

    传智播客struts2全程学习笔记

    &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter &lt;filter-name&gt;struts2 &lt;url-pattern&gt;/* ``` 自从Struts2.1.3版本之后,原来的`FilterDispatcher`类已经被标记为过时...

    新struts2+jQuery所需包.rar

    &lt;filter-class&gt;org.apache.struts2.dispatcher.FilterDispatcher, 新版本中都是过时的了,采取该过滤器, &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter。

    第1讲.Struts2入门与配置

    &lt;filter-class&gt;org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter &lt;filter-name&gt;struts2 &lt;url-pattern&gt;/* ``` 然后,我们需要创建一个Action类。Action类是业务逻辑的载体,通常继承自`...

    struts2源代码分析

    - `org.apache.struts2.dispatcher.Dispatcher`:是Struts2的核心类,它初始化框架并调用Action执行。同时,它也是一个过滤器,负责清理ActionContext,防止内存泄漏,处理静态内容,以及启动拦截器链。 - `org....

    解决struts2下载异常的jar包 struts2-sunspoter-stream-1.0.jar

    at javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108) at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:770) at org.apache.struts2....

    Struts2的常量详解

    struts.mapper.class 属性指定将 HTTP 请求映射到指定 Action 的映射器,Struts 2 提供了默认的映射器:org.apache.struts2.dispatcher.mapper.DefaultActionMapper。 13. struts.action.extension struts.action....

    Struts2入门教程(全新完整版)

    org.apache.struts2.dispatcher.ServletActionRedirectResult 16 plainText 16 显示源文件内容,如文件源码 16 org.apache.struts2.dispatcher.PlainTextResult 16 freemarker 16 处理FreeMarker模板 16 org.apache....

    Struts2源码分析

    拦截器链是由`org.apache.struts2.dispatcher.FilterDispatcher`这个过滤器启动的,它负责处理HTTP请求,启动拦截器链并调用相应的Action。 `Dispatcher`类在Struts2中扮演着重要角色,它负责框架的初始化和Action...

Global site tag (gtag.js) - Google Analytics