升级到tomcat 8.0.43时,为什么报表生成器引发异常

时间:2017-05-19 10:13:13

标签: tomcat jasper-reports

我们发现当将tomcat从8.0.30升级到8.0.43时,JasperReports会引发以下错误。

JasperCompileManager.compileReport(jrxmlFilePathname);
---------------------^^^^^^^^^^^^^

Errors were encountered when compiling report expressions class file:
1. java.lang.Double cannot be resolved to a type
            value = ((java.lang.Double)field_amount.getValue()); //$JR_EXPR_ID=15$
                      <-------------->

将tomcat降级到8.0.30后,此错误消失了

1 个答案:

答案 0 :(得分:1)

升级到JasperReports 6.3.1,旧版本有与使用ECJ 4.6.0或更新版本的报告编译相关的错误。

Tomcat 8.0.43附带ECJ 4.6.1,而Tomcat 8.0.30附带ECJ 4.4.2。

或者(如果您不想升级JasperReports),请在WEB-INF / lib下的webapp中包含ecj-4.3.1.jar