关于grails 2.4.3的JasperReport插件错误

时间:2015-01-06 16:07:59

标签: grails jasper-plugin

我有:

def reportDef = new JasperReportDef(name:'myreport.jasper', fileFormat:JasperExportFormat.PDF_FORMAT)
response.outputStream << jasperService.generateReport(reportDef).toByteArray()

和jasperService.generateReport(reportDef)总是给我:

Error | 2015-01-06 14:06:53,449 [http-bio-8080-exec-7] ERROR errors.GrailsExceptionResolver  - NoSuchMethodError occurred when processing request: [POST] /CRM/contratoDesvincular/gerarRelatorio
com.lowagie.text.pdf.PdfWriter.setTabs(Lcom/lowagie/text/pdf/PdfName;)V. Stacktrace follows:
Message: Executing action [gerarRelatorio] of controller [org.catelani.crm.ContratoDesvincularController]  caused exception: Runtime error executing action
Line | Method
->>  198 | doFilter  in grails.plugin.cache.web.filter.PageFragmentCachingFilter

我在BuildConfig上编译了“:jasper:1.10.0”。

任何人都知道发生了什么事?

1 个答案:

答案 0 :(得分:1)

问题在于附带grails 2.4.3的iText:

build "com.lowagie:itext:2.1.7"

这会覆盖grails使用的插件并解决问题。