We have a report that compiles fine under Java 7. With Java 8 going GA, we wanted to test there as well. When we compile the following expression under Java 8
( new Boolean($P{comparisonBase}.equals("YOY")) ? $R{label.campaign.prior.year} : $R{label.campaign.prior.period} )
We get this exception thrown.
Caused by: org.springframework.context.ApplicationContextException: Could not parse JasperReports report from ServletContext resource [/WEB-INF/report/marketing/marketing_overview.jrxml]; nested exception is net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
value = ( new Boolean(((java.lang.String)parameter_comparisonBase.getValue()).equals("YOY")) ? str("label.campaign.prior.year") : str("label.campaign.prior.period") ); //$JR_EXPR_ID=22$
<------------------------------------------------------------------->
1 errors
This does not occur in Java 7.
Recommended Comments