Getting exception at runtime for Jasper report

Hi There,

I am getting below exception at runtime for my Jasper report, any help will be highly appreciated.

Server : tomcat 7.0.57/8.5.6


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 = ((java.lang.String)field_varPct.getValue()).trim().contains("-"); //$JR_EXPR_ID=18$
1 errors
at net.sf.jasperreports.engine.JasperCompileManager.compile(
nhinfall's picture
Joined: Oct 13 2016 - 1:33pm
Last seen: 6 years 7 months ago

1 Answer:

Seems like you're compiling with JDK1.8 while JasperReports is compiled using JDK 1.7. Try version down to JDK1.7 or set source level to JDK1.8 in your project.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 11 months ago