1. Report Dependencies
<dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.0.0</version> </dependency>
2. Exceptions
org.codehaus.groovy.control.CompilationFailedException
Solution:
<dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>2.4.3</version> </dependency>
3. Abnormal error
Net.sf.jasperreports.engine.JRRuntimeException:Could not load the following font:pdffontname:stsong-light Pdfencoding:unigb-ucs2-h Ispdfembedded:true at Net.sf.jasperreports.engine.export.JRPdfExporter.getFont ( jrpdfexporter.java:2152) at Net.sf.jasperreports.engine.export.JRPdfExporter.getChunk (jrpdfexporter.java:1942) At Net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase (jrpdfexporter.java:1911) at NET.SF.JASPERREPORTS.E Ngine.export.SimplePdfTextRenderer.getPhrase (simplepdftextrenderer.java:89) at Net.sf.jasperreports.engine.export.SimplePdfTextRenderer.render (simplepdftextrenderer.java:99) at Net.sf.jasperreports.engine.export.JRPdfExporter.exportText (jrpdfexporter.java:2275) at Net.sf.jasperreports.engine.export.JRPdfExporter.exportElements (jrpdfexporter.java:985) at Net.sf.jasperreports.engine.export.JRPdfExporter.exportPage (jrpdfexporter.java:944) at Net.sf.jasperreports.engine.export. Jrpdfexporter.exportreporttostream (jrpdfexporter.java:816) at Net.sf.jasperreports.engine.export.JRPdfExporter.exportReport (jrpdfexporter.java:519) at Net.sf.jasperreports.engine.JasperExportManager.exportToPdfFile (jasperexportmanager.java:157) at Net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile (jasperexportmanager.java:505) at Com.gs.ireport.service.ReportService.main (reportservice.java:64) at SUN.REFLECT.NATIVEMETHODACCESSORIMPL.INVOKE0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:57) at SUN.REFL Ect. Delegatingmethodaccessorimpl.invoke (delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke ( method.java:606) at Com.intellij.rt.execution.application.AppMain.main (appmain.java:147)
Solution:
<dependency> <groupId>com.itextpdf</groupId> <artifactId>itext-asian</artifactId> <version>5.2.0</version> </dependency>
Jasperreports+ireport Development and construction