2 qq 34274769 qq_34274769 于 2016.09.21 11:34 提问

ueditor富文本上传本地图片失败~

图片说明
后台报错:
信息: reqeust:/shdz/manager/ueditor/jsp/controller.jsp;sid from cookie:true,sid from url:false
2016-9-21 11:16:17,000ERROR http-8080-5 上传失败
java.lang.ClassCastException: org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper
at cn.com.do1.component.ueditor.upload.BinaryUploader.save(BinaryUploader.java:65)
at cn.com.do1.component.ueditor.upload.Uploader.doExec(Uploader.java:24)
at cn.com.do1.component.ueditor.ActionEnter.invoke(ActionEnter.java:85)
at cn.com.do1.component.ueditor.ActionEnter.exec(ActionEnter.java:53)
at org.apache.jsp.manager.ueditor.jsp.controller_jsp._jspService(controller_jsp.java:60)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:86)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ecside.filter.ECSideFilter.doFilter(ECSideFilter.java:219)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.com.do1.common.framebase.dqdp.DqdpFilter.doFilterInternal(DqdpFilter.java:69)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.authentication.switchuser.SwitchUserFilter.doFilter(SwitchUserFilter.java:181)
at cn.com.do1.component.systemmgr.authorize.switchusr.DqdpSwitchUserOnceFilter.doFilter(DqdpSwitchUserOnceFilter.java:30)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at cn.com.do1.dqdp.core.permission.DqdpSessionFilter.doFilterInternal(DqdpSessionFilter.java:38)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at cn.com.do1.dqdp.core.permission.DqdpSecurityFilter.doFilterInternal(DqdpSecurityFilter.java:73)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125)
at cn.com.do1.dqdp.core.permission.DqdpConcurrentSessionFilter.doFilter(DqdpConcurrentSessionFilter.java:70)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:359)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:275)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:344)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:272)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)

2个回答

qq_34274769
qq_34274769   2016.09.21 14:12

不过,感觉是struts2的拦截器拦截了!

Marksinoberg
Marksinoberg   Ds   Rxr 2016.09.21 13:19
 java.lang.ClassCastException: org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

你想强制类型转换的时候应该是发生了错误,仔细的去调试一下吧。

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
django 与 百度 ueditor 富文本编辑器集成之一:图片上传,文件上传
django 是基于 python 的一个很好的web开发框架。ueditor 是百度开源的一个富文本编辑器。有很好的用户体验,很适合中国人使用的一个编辑器。 在使用ueditor 之前,我集成过 fckeditor , ckeditor 。基本没什么难度。但功能没有ueditor 强大。因此产生了用django 集成 ueditor 的想法。 查看了百度官方的文档以及例子,发现只有
Ueditor本地图片添加alt属性
网上能搜索出来很多用代码修改的,我没试过,我感觉是同一修改成了一个 alt。 但我想每张图片有不同的alt。 自己摸索了一下。 上传好本地图片之后点修改 然后 更改描述内容,确定,就好啦。
ueditor本地上传图片失败
详细说明了ueditor上传失败的问题及解决方案 贴有源码
在jsp页面中添加富文本编译器(ueditor)+ 图片上传功能
一次老大让我把文本的编辑区域加一个富文本编译器,于是马上下载了一个kindEditor来试试,但后来老大推荐说百度的ueditor编译器不错,于是我便怀着扩展知识,又学到一个新东西的心理下载了百度的ueidtor编译器,整合到项目中感觉确实不错,今天就和大家分享下这个富文本编译器的使用…… 第一步:首先下载ueditor编译器,地址:http://ueditor.baidu.com/websit
【ASP.NET】10.解决百度富文本编辑器UEditor本地上传图片正常,放到服务器上以后图片上传按钮变灰不能点击的问题
    最近做项目要实现一个新闻发布的功能,新闻模块用了UEditor编辑器,可以上传图片和附件。本地上传都是正常的,但是,当网站上线以后,测试的时候,发现里面的上传单张图片按钮变成了灰色无法点击,而上传多张图片按钮和上传附件按钮可以点击,但是也不能上传,提示错误:/ueditor/asp/controller.asp not found。自己也郁闷了好几天,f12浏览器里面controller....
富文本编辑器UEditor的使用上传图片到图片服务器
当大家使用了UEditor之后,会发现其自带的图片上传方法只能存在项目当中,每当项目重新发布,之前的数据就无法自动保存。这个时候就需要我们修改图片上传方式,将图片保存在数据库或电脑的其他地方,从而解决这个问题。如果大家研究的仔细的话,利用chrome浏览器F12中有一个Network功能,能看到一次加载的所有网址。当大家在进行图片上传时,UEditor会自动执行`controller.jsp?ac...
Ueditor富文本编辑器--Ctrl V 粘贴后原有图片显示错误
最近负责将公司官网从静态网站改版成动态网站,方便公司推广营销人员修改增加文案,避免官网文案维护过于依赖技术人员。在做后台管理系统时用到了富文本编辑器Ueditor,因为公司有一个阿里云文件资源服务器,而Ueditor默认将上传图片上传到本地服务器,所以自己也是网上查了很多资料,最终解决了这个问题。 这里使用到的Ueditor版本为net版 对于Ueditor的配置使用,我就不多说了。这里只讲如何上
ueditor上传文件到七牛云坑爹录
最近用了一下ueditor,版本是1.4.3.3,上传文件要上传到七牛,网上能找到的都是基于比较较旧的版本写的,比较痛苦,找半天也找不到一个可以参考的,百度的开源项目代码烂码农兄弟们大多心里是有数了的,就不多说了,坑都给坑到没了。 不多说,下面开始哈。 UEdit分为后端配置和前端配置 首先建议去下载它的源码来用,千万不要用百度打好的,下好源码后就放到你的项目里,包括两个部分,j
百度ueditor富文本--图片保存路径的配置以及上传到远程服务器
ad
YII中Ueditor富文本编辑器文件和图片上传的配置
将Ueditor集成到YII框架中后,参照editor_config.js中的toolbars中的内容,更改options中标签可以给编辑器添加想要的功能: 因此要想添加文件和图片上传功能,应该加入以下两个标签: 文本编辑器中便出现了对应的两个选项: 但是点击上传图片按钮后发现,无法正常进行图片上传,文件上传也是失败的,问题都是Flash Player需要升级, 因此在火狐