使用jasperreports-5.6.0.jar导致的问题
2016-07-05 11:20
381 查看
Struts2+jasperReport5.6如下设置:
运行系统提示错误如下:
解决问题:
参考(http://bbs.csdn.net/topics/390861809)说是因为JasperReport版本的问题,
于是安装iReport5.2,并用里面的
![](http://img0.ph.126.net/09f4i9CJpEp-1ER4VMT1hg==/4819696026317380827.jpg)
和替换原来的jar包
![](http://img2.ph.126.net/jIcT4hVdnc0J5rXFzRutEQ==/6631750562419513661.jpg)
,问题解决。
<!-- 社员档案 --> <package name="com.anche.qh.arc.arcMember" extends="json-default"> <result-types> <result-type name="jasper" class="org.apache.struts2.views.jasperreports.JasperReportsResult" /> </result-types> <action name="arcMember_*" class="actArcMember" method="{1}"> <result type="json"> <param name="root">jsonResult</param> </result> </action> <action name="arcMemberStr_*" class="actArcMember" method="{1}"> <result type="json"> <param name="root">returnStr</param> </result> </action> <action name="arcMemberPdf_*" class="actArcMember" method="{1}"> <result name="success" type="jasper"> <param name="location">/reportSource/arc/member.jasper</param> <param name="dataSource">list</param> <param name="format">PDF</param> </result> </action> </package> |
运行系统提示错误如下:
六月 07, 2016 11:46:05 上午 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet [default] in context with path [/yyhzs] threw exception [Filter execution threw an exception] with root cause java.lang.NoSuchMethodError: net.sf.jasperreports.engine.util.JRLoader.loadObject(Ljava/lang/String;)Ljava/lang/Object; at org.apache.struts2.views.jasperreports.JasperReportsResult.doExecute(JasperReportsResult.java:323) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:374) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:278) at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:211) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:90) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:192) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:249) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:510) at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) |
解决问题:
参考(http://bbs.csdn.net/topics/390861809)说是因为JasperReport版本的问题,
于是安装iReport5.2,并用里面的
![](http://img0.ph.126.net/09f4i9CJpEp-1ER4VMT1hg==/4819696026317380827.jpg)
和替换原来的jar包
![](http://img2.ph.126.net/jIcT4hVdnc0J5rXFzRutEQ==/6631750562419513661.jpg)
,问题解决。
相关文章推荐
- ASP.NET的缓存机制
- Android AOP 之AspectJ(一)
- asp.net Core开启全新的时代,用视频来告诉你,学习就是这么SO easy。
- 『ExtJS』表单(二)表单行为与Asp.NET页面的消息回复
- TimesTen 数据库复制学习:11. ASP带缓存组复制的几种固定架构模式
- asp:Repeater数据源为空时处理方式
- 在ASP.NET MVC中,使用Bundle来打包压缩js和css(转)
- ASP.NET-----验证控件
- ASP.NET MVC4企业级实战目录
- ASP.NET MVC4企业级实战目录
- 【iReport+JasperReport】3.在Java工程中用jasper导出Excel报表
- ASP.net DbGeography
- ASP.net如何保证EF操作类线程内唯一
- 树莓派无法上网
- asp.net Calendar 控件
- asp.net ImageButton 控件
- asp.net LinkButton 控件
- asp.net core 之静态文件目录的操作
- [Spring框架]Spring AOP基础入门总结二:Spring基于AspectJ的AOP的开发.
- asp.net WebService的一个简单示例