jasperReport打印错误

问题描述

网上都是说jar包冲突,可是我所有的包都检查了一遍都没发现有重复的PrintServiceExporterConfiguration,还是我检查的方法不对,不知道大家有碰到同样的问题没?JRPrinterApplet.java/**设置纸张*/PrintRequestAttributeSetprintRequestAttributeSet=newHashPrintRequestAttributeSet();System.out.println("开始设置打印纸张大小");MediaSizems=newMediaSize(241,279.4f,Size2DSyntax.MM,MediaSizeName.ISO_A4);printRequestAttributeSet.add(ms.getMediaSizeName());System.out.println("完成设置打印纸张大小");JRPrintServiceExporterpse=newJRPrintServiceExporter();System.out.println("开始装载报表数据");pse.setParameter(JRExporterParameter.JASPER_PRINT,print);System.out.println("完成装载报表数据");System.out.println("开始加入纸张设置");pse.setParameter(JRPrintServiceExporterParameter.PRINT_REQUEST_ATTRIBUTE_SET,printRequestAttributeSet);System.out.println("完成加入纸张设置");pse.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG,Boolean.TRUE);pse.exportReport();//这行报错

java.lang.SecurityException:class"net.sf.jasperreports.export.PrintServiceExporterConfiguration"'ssignerinformationdoesnotmatchsignerinformationofotherclassesinthesamepackage

解决方案

解决方案二:
把你的含net.sf.jasperreports.export.PrintServiceExporterConfiguration的jar包,放在classpath的最前面试一试
解决方案三:
你的classpath里依赖的哪些包?
解决方案四:
或者看看
解决方案五:
引用2楼defonds的回复:

你的classpath里依赖的哪些包?

你好,lib下有一下jar包,其中jasperreports-5.6.1.jar含net.sf.jasperreports.export.PrintServiceExporterConfiguration.class。其他包都没找到net.sf.jasperreports.export.PrintServiceExporterConfiguration.class这个classVolumeindriveDisDVolumeSerialNumberis7ABF-8023DirectoryofD:ProgramFilesApacheTomcat6webappscyoaWEB-INFlib[.][..]antlr-2.7.6.jarcglib-2.2.jarclasses12.jarcom.springsource.net.sf.cglib-2.2.0.jarcom.springsource.org.aopalliance-1.0.0.jarcom.springsource.org.apache.commons.fileupload-1.2.0.jarcom.springsource.org.apache.commons.httpclient-3.1.0.jarcom.springsource.org.apache.commons.logging-1.1.1.jarcom.springsource.org.apache.log4j-1.2.15.jarcom.springsource.org.aspectj.weaver-1.6.8.RELEASE.jarcom.springsource.org.codehaus.jackson.mapper-1.0.0.jarcommons-beanutils.jarcommons-cli-1.2.jarcommons-collections-3.2.jarcommons-digester.jarcommons-fileupload.jarcommons-httpclient.jarcommons-io-2.0.1.jarcommons-lang.jarcommons-logging-1.0.4.jarcos.jardom4j-1.6.1.jarehcache-1.2.3.jarejb3-persistence.jarezmorph-1.0.5.jarfreemarker-2.3.16.jarhibernate-annotations.jarhibernate-commons-annotations.jarhibernate-entitymanager.jarhibernate-validator.jarhibernate3.jarjasperreports-5.6.1.jarjavassist-3.9.0.GA.jarjbpm-db.jarjbpm.jarjodconverter-2.2.2.jarjodconverter-cli-2.2.2.jarjsf-api.jarjsf-impl.jarjson-lib-2.2.2-jdk15.jarjstl-1.2.jarjstl.jarjta-1.1.jarjuh-3.0.1.jarjunit-3.8.1.jarjurt-3.0.1.jarjxl.jarlog4j-1.2.16.jarmail.jarmorph-1.1.1.jarname.txtognl-3.0.jarojdbc14-10.2.0.4.0.jarOracle_10g_10.2.0.4_JDBC_classes12.jarorg.springframework.aop-3.0.1.RELEASE-A.jarorg.springframework.asm-3.0.1.RELEASE-A.jarorg.springframework.aspects-3.0.1.RELEASE-A.jarorg.springframework.beans-3.0.1.RELEASE-A.jarorg.springframework.context-3.0.1.RELEASE-A.jarorg.springframework.core-3.0.1.RELEASE-A.jarorg.springframework.expression-3.0.1.RELEASE-A.jarorg.springframework.instrument-3.0.1.RELEASE-A.jarorg.springframework.instrument.tomcat-3.0.1.RELEASE-A.jarorg.springframework.jdbc-3.0.1.RELEASE-A.jarorg.springframework.orm-3.0.1.RELEASE-A.jarorg.springframework.oxm-3.0.1.RELEASE-A.jarorg.springframework.transaction-3.0.1.RELEASE-A.jarorg.springframework.web-3.0.1.RELEASE-A.jarorg.springframework.web.portlet-3.0.1.RELEASE-A.jarorg.springframework.web.servlet-3.0.1.RELEASE-A.jarorg.springframework.web.struts-3.0.1.RELEASE-A.jarpager-taglib.jarpersistence.jarpoi-3.9-20121203.jarridl-3.0.1.jarservlet-api.jarslf4j-api-1.6.4.jarslf4j-jdk14-1.5.6.jarslf4j-log4j12-1.6.1.jarspring.jarsqljdbc4.jarstruts2-core-2.2.1.1.jarstruts2-json-plugin-2.2.1.1.jarstruts2-spring-plugin-2.2.1.1.jarunoil-3.0.1.jarxstream-1.3.1.jarxwork-core-2.2.1.1.jar87File(s)39,967,619bytes2Dir(s)127,642,738,688bytesfree
解决方案六:
引用3楼nanpinggao的回复:

或者看看

你好,我根据里边的方案最后删除检验文件还是不行,会不会是这个提示跟其他方面有关?

时间: 2024-08-12 06:22:50

jasperReport打印错误的相关文章

单元测试-C语言 应该怎么修改宏定义 在函数5执行之后,打印错误error 函数6也能执行

问题描述 C语言 应该怎么修改宏定义 在函数5执行之后,打印错误error 函数6也能执行 这是函数5static char * test_replace(){Link_t head;head = LinkTable_new();Link_t temp3 =Link_replace(head101""cpp101"");int number4;if(temp3 != NULL){number4 =2;}else{number4 =0;}if(number4 == 1

c语言-帮忙看下C语言打印错误

问题描述 帮忙看下C语言打印错误 #include int main(void) { int n,i,j,t; scanf("%d",&n); for(i=1;i<=4;i++){ for (j=1;j<=n-i;j++) printf(" "); for(t=1;t<=2i-1;t++) printf("*"); printf("n");} for(i=3;i>=1;i--){ for (j=

在jsp页面上打印错误堆栈

js|错误|打印|页面 try{....................}catch(Exception e){ //定义一个流 ByteArrayOutputStream ostr = new ByteArrayOutputStream(); //把错误堆栈储存到流中 e.printStackTrace(new PrintStream(ostr)); //打印.... out.println(ostr.toString()); }

jasperreport打印票据的问题 求解~~

问题描述 敢问大虾们,我现在用jasperreport实现套打,打印的纸张规格是和增票一样,(纸张规格是halfletter,大概为21.59cm*13.97cm).在jasperreport新建报表时,我选择的是halfletter纸张,pageorientation为landscape.打印机用的是针式打印机,弹出的打印对话框中,打印机设置里面设置为纵向,打印出来的效果是横向的(即内容与长度较长的边是平行的),但此时打印纸的右边部分打印不出来了,明显只打印了较短的边的长度,即21.59cm的

[再寄小读者之数学篇](2014-07-27 打印错误吧)

$$\beex \bea &\geq \frac{2}{\sqrt{a}}\sez{\frac{(a-I)^2}{4}+aI}\\ &=\frac{2}{\sqrt{a}}\frac{(a+I)^2}{4}\\ &\geq \frac{1}{2}a^\frac{3}{2}. \eea \eeex$$ 不过最后一步我不会. $I$ 不知道正负啊. 

报表 批量打印-通过勾选一次打印多页报表

问题描述 通过勾选一次打印多页报表 通过勾选按钮在datagridview中多选记录,在报表模板中进行多页打印,怎么做?求大神 解决方案 Sub 手动双面打印() Dim Pages As Long Dim myBottonNum As Integer Dim myPrompt1 As String Dim myPrompt2 As String myPrompt1 = ""在打印时发生错误,请检查你的打印机设置"" myPrompt2 = ""

细看PEAR的错误处理

错误|错误处理 PEAR提供了强大的错误处理机制.这篇文章向你展示如何从这个系统中获益. 许多程序已经使用了PEAR的包.许多PHP程序员或多或少的熟悉了PEAR中的错误处理.但是这个机制并不局限于PEAR的包--所有人都能在他们的类和程序中使用这些方法. 这篇文章被分为两个部分:首先我们将看看类中用于错误处理的函数,然后我们将看看如何基于PEAR错误处理机制来处理错误. 我们的例子类称为cvs2db,它把数据从CSV文件插入到数据库的表中.因为数据可能是手写的,他们的数据应该在插入之前先得到验

asp.net里,一个小的自定义错误显示

asp.net|错误|显示   //打印错误信息.  public static string ShowError(Exception e)  {   return "<font size=2>程序错误:"+e.Message + "<BR>详细信息:" + e.StackTrace + "</font>";  }   public static void CheckNull(object a,System.W

log4j perl 错误日志提取

日志 #!/bin/perl use Encode ; open(NOTESFILES,$ARGV[0]); my %errorMeganotes; print ">>>>>>>>>>>>>>",$ ARGV[0],"<<<<<<<<<<\n"; while (<NOTESFILES>) { if( $_=~/^