net.sf.jasperreports.engine.JRRuntimeException: Increment class not found. error

2

Hi guys

I have this error that started to appear when i run my report in Jaspersoft Studio 5.5. I havent changed anything, increment type is set to none. I am stuck as it seems I cant find the problem anywhere.

Error:

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRRuntimeException: Increment class  not found.
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.fillReport(ReportControler.java:482)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler.access$18(ReportControler.java:457)
    at com.jaspersoft.studio.editor.preview.view.control.ReportControler$4.run(ReportControler.java:347)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: net.sf.jasperreports.engine.JRRuntimeException: Increment class  not found.
    at net.sf.jasperreports.engine.fill.JRFillSubreportReturnValue.getIncrementer(JRFillSubreportReturnValue.java:127)
    at net.sf.jasperreports.engine.fill.FillReturnValues.copyValue(FillReturnValues.java:248)
    at net.sf.jasperreports.engine.fill.FillReturnValues.copyValues(FillReturnValues.java:230)
    at net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:792)
    at net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:332)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:384)
    at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:358)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2059)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:778)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:288)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:151)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:932)
    at net.sf.jasperreports.engine.fill.BaseFillHandle$ReportFiller.run(BaseFillHandle.java:120)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:175)
    at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115)
    at net.sf.jasperreports.engine.fill.JRFillSubreportReturnValue.getIncrementer(JRFillSubreportReturnValue.java:122)
    ... 13 more

Thanks for any help!

Pawel

pawelkosi's picture
Joined: Jan 14 2014 - 9:07am
Last seen: 2 years 3 months ago

1 Answer:

9

Ok. I know this response is very late but I ran into this issue today
I am posting in the hope that this will save someone some time.

When you have a sub report that returns values and you do a calculation eg sum it will generate the following XML.

<returnValue subreportVariable="SubReport_SysVar_SubTotal" toVariable="MainReport_SysVar_Total" calculation="Sum"/>

In the "Subreport Return Values" screen you get a table with 4 columns  the last one is Incrementer Factory Class.

If you have tried to do any calculation or even just looked into the Incrementer Factory Class option in this screen it will add the
incrementerFactoryClass option to the setting.

<returnValue subreportVariable="SubReport_SysVar_SubTotal" toVariable="MainReport_SysVar_Total" calculation="Sum" incrementerFactoryClass=""/>

This will cause you to get the error.

Quick an easy fix is to remove the incrementerFactoryClass="" in the source file and save.

peter.w's picture
303
Joined: Oct 12 2012 - 6:57am
Last seen: 2 months 3 days ago

saved me tons of time - thanks for taking the time to post your findings

ntatlock - 5 years 1 week ago

I had the same error and your fix worked for me as well.

meatwad - 4 years 7 months ago

you helped me really. Thank you! @JASPER TEAM: why is this bad behaviour/bug still existing? I'm working with the integrated Eclipse iReport plugin.

r.vandenheuvel - 4 years 6 months ago
show 4 more...

Saved me a lot of time as well.

kruger53_1 - 4 years 6 months ago

Really helpful. Thanks.

vijayshree.patil - 4 years 5 months ago

Thanks dude!

haziel - 3 years 1 month ago

really helpful dude

phaks - 2 years 11 months ago
Feedback
randomness