JasperReports: Boxing/unboxing errors during template compilation

When you try to compile the report with the statement like

<printWhenExpression><![CDATA[$F{billingData} != null]]></printWhenExpression>

you’ll get the errors like:
1. Cannot cast from boolean to Boolean
The reason is that by default compliance with very low JDK versions is used. Something like 1.2 or 1.3. So lets migrate compilation of JasperReports templates to Java 5. JasperReports uses Eclipse JDT compiler so we’ll need to specify the following parameters:


You can do it via jasperreports.properties file/System.setProperty()/JVM parameters.
Once you specify these parameters – all of the boxing/unboxing operations are done automatically and the errors are gone.