简体   繁体   English

java.lang.NoSuchFieldError:APPDEFAULT

[英]java.lang.NoSuchFieldError: APPDEFAULT

java.lang.NoSuchFieldError: APPDEFAULT
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:534) [jasperreports-5.1.2.jar:5.1.2] 

    JRExporter ex = new JRPdfExporter();
    ex.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    ex.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
    ex.exportReport(); // exception here 

I exports HTML successfully but when trying to export jasper report to PDF by this code I have that exception. 我成功导出HTML但是在尝试通过此代码将jasper报告导出为PDF时,我有异常。

I googled it I found answer is to add iText2.1.7.jar, I added it but still having the same exception 我用google搜索我发现答案是添加iText2.1.7.jar,我添加了它但仍然有相同的异常

您应该在路径中更改iText.jar.put itext-4.2.0.jar的版本,确定

Try to add iTextAsian.jar . 尝试添加iTextAsian.jar

You can find ireport libs to <root of ireport installation>/ireport/modules/ext 你可以找到ireport libs到<root of ireport installation>/ireport/modules/ext

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM