问题描述
网上都是说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的回复:
或者看看
你好,我根据里边的方案最后删除检验文件还是不行,会不会是这个提示跟其他方面有关?