[#14426] - Years -- error only on report server

Category:
Bug report
Priority:
Normal
Status:
New
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

Hello,

I work in jaspersoft studio and all is fine but when I generate report on report server, the report has error.
I use library jasperreports-functions-6.19.1.jar, 6.20.0 on jasperreport studio and on report server.

when i change library to jasperreports-functions-6-16.0 on report server - all is fine.

[22/09/22 01:52:00:000] [http-nio-10411-exec-1] ERROR net.sf.jasperreports.engine.fill.JRFillSubreport: Fill 1: exception
net.sf.jasperreports.engine.fill.JRExpressionEvalException: Error evaluating expression for source text: YEARS($F{DATA_UR},NOW())
at net.sf.jasperreports.engine.fill.JREvaluator.handleEvaluationException(JREvaluator.java:294)
at net.sf.jasperreports.engine.fill.JREvaluator.evaluateEstimated(JREvaluator.java:406)
at net.sf.jasperreports.engine.fill.JRCalculator.evaluateEstimated(JRCalculator.java:664)
at net.sf.jasperreports.engine.fill.JRCalculator.estimateVariables(JRCalculator.java:250)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1411)
at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:1385)
at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1201)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:117)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:622)
at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:414)
at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:826)
at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:61)
at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:221)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: java.lang.Math.floorDiv(JI)J
at net.sf.jasperreports.functions.standard.DateTimeFunctions.ofInstant(DateTimeFunctions.java:750)
at net.sf.jasperreports.functions.standard.DateTimeFunctions.YEARS(DateTimeFunctions.java:563)

jasper library
tomasz_4's picture
Joined: Mar 17 2017 - 1:33pm
Last seen: 2 months 1 week ago

1 Comment:

#1

jasperreports-functions 6.19.1 and 6.20.0 are not (fully) compatible with Java 8 as a method introduced in Java 9 is used by certain functions.

The problem has already been fixed at https://github.com/TIBCOSoftware/jasperreports/commit/192e6c6bb7a5afc4da...

You can fix it by fetching the latest jasperreports-functions snapshot from https://jaspersoft.jfrog.io/ui/native/jr-ce-snapshots/net/sf/jasperrepor...

Feedback