Error generating and downloading report (JasperReports)

3

I am making a list to download invoices, but when I generate a report with many concepts or that it grows too much, it is throwing me an exception, which I copy below

  

java.lang.NoSuchMethodError: org.apache.commons.javaflow.Continuation.suspend () V       at net.sf.jasperreports.engine.fill.JRContinuationSubreportRunner.suspend (JRContinuationSubreportRunner.java:74)       at net.sf.jasperreports.engine.fill.JRBaseFiller.suspendSubreportRunner (JRBaseFiller.java:1829)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.addPage (JRVerticalFiller.java:1833)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak (JRVerticalFiller.java:1916)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak (JRVerticalFiller.java:1945)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail (JRVerticalFiller.java:731)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent (JRVerticalFiller.java:285)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport (JRVerticalFiller.java:132)       at net.sf.jasperreports.engine.fill.JRBaseFiller.fill (JRBaseFiller.java:836)       at net.sf.jasperreports.engine.fill.JRBaseFiller.fill (JRBaseFiller.java:765)       at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport (JRFillSubreport.java:644)       at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run (JRSubreportRunnable.java:59)       at org.apache.commons.javaflow.bytecode.StackRecorder.execute (StackRecorder.java:104)       at org.apache.commons.javaflow.Continuation.continueWith (Continuation.java:172)       at org.apache.commons.javaflow.Continuation.startWith (Continuation.java:129)       at org.apache.commons.javaflow.Continuation.startWith (Continuation.java:100)       at net.sf.jasperreports.engine.fill.JRContinuationSubreportRunner.start (JRContinuationSubreportRunner.java:53)       at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare (JRFillSubreport.java:725)       at net.sf.jasperreports.components.table.fill.FillTableSubreport.prepareSubreport (FillTableSubreport.java:159)       at net.sf.jasperreports.components.table.fill.FillTable.prepare (FillTable.java:307)       at net.sf.jasperreports.engine.fill.JRFillComponentElement.prepare (JRFillComponentElement.java:129)       at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements (JRFillElementContainer.java:328)       at net.sf.jasperreports.engine.fill.JRFillBand.fill (JRFillBand.java:393)       at net.sf.jasperreports.engine.fill.JRFillBand.fill (JRFillBand.java:352)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand (JRVerticalFiller.java:2023)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail (JRVerticalFiller.java:755)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart (JRVerticalFiller.java:265)       at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport (JRVerticalFiller.java:128)       at net.sf.jasperreports.engine.fill.JRBaseFiller.fill (JRBaseFiller.java:836)       at net.sf.jasperreports.engine.fill.JRBaseFiller.fill (JRBaseFiller.java:765)       at net.sf.jasperreports.engine.fill.JRFiller.fillReport (JRFiller.java:84)

I do not know if anyone of you has gone through a similar case or that you can guide me with this case.

    
asked by omarsinho 30.06.2016 в 18:55
source

2 answers

1

The first recommendation I would make is that you will update your version of jasper to a 5.X at least (this year we are already in 6.X)

If for some reason you need to necessarily use that version of jasper You must update your version of javaflow try this version

This if you have the method suspend in class Continuation

public static Object suspend() {
    return suspend(null);
}
    
answered by 01.07.2016 в 17:33
0

From what I understand of your stack trace , I find a javaflow version compatibility problem. Yours does not contain void Continuation.suspend() , which is used by the single-thread algorithm of your version of Jasper Reports.

The newest version of javaflow contains Object Continuation.suspend() . This is seen here: link

The newest version of Jasper Reports tries to use void Continuation.suspend() , as seen here: link

My conclusion is that you need a specific version of javaflow with the "good" definition of Continuation.suspend() . I import from mine with Maven:

        <dependency>
            <groupId>commons-javaflow</groupId>
            <artifactId>commons-javaflow</artifactId>
            <version>20060411</version>
        </dependency>
    
answered by 11.10.2016 в 21:54