java - JasperReports not work on Grails 2.4: Could not initialize class net.sf.jasperreports.engine.xml.JRXmlDigesterFactory -


I am using grails version 2.4.0 and JasperReports plugin: 1.9.0 ( Also tried version Jasper-1.10.0-SNAPSHOT) But when I export to PDF, I get errors.

When I start the project for the first time, I run the export report and got this message

  Org.apache.commons.collections.map.ReferenceMap  

After this I try again and it shows this error.

  The classnet could not be started Sf.jasperreports.engine.xml.JRXmlDigesterFactory  

This version is competing with 2.4.0 because it is 2.2 Works on .4

Here my code

in the controller

  def result = new ArrayList () def reportfolder = "$ {grailsApplication. ParentContext.getResource ('report'). File.absolutePath} "def sep = System .getProperty ('file.separator') def App = applicant.get (2) results.add (first of all: app.firstName, between: app Middle Initial, ("$ {ReportFolder} $ {sep} aaa.jrxml", results, parameters, feedback)  >  

In service (note that service name: reportService)

  DIF Export PDF report (string report path, result, parameter, response) {def temp_file = File. CreateTempFile ("JsperFilManager.fillReport (jReport, params, jrDataSource) JasperExportManager.exportReportToPdfFile (print, temp_file.absolutePath) feedback. JR.Prp is using the file extension. The response.setHeader ("Content-Transfer-Encoding", "Binary" ) Response.outputStream & lt; Temp_file.newInputStream () temp_file.deleteOnExit ()}  

Any ideas?

version 2.4 or later. You can not add the Jasper plugin because this is missing the library from the third part.

This problem is very easy to solve. You only want to copy your jaws to your / lid

  • org.apache.commons.collections.jar
  • Commons-Bean ils -1.9.2.jar < / Li>

It works 100% :-)


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -