2

Using Netbeans IDE 8.0.2 and JDK8, when I try to generate a PDF report i get this error:

The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class filesvalue = ((java.lang.String)field_type.getValue()).contentEquals("XML"); //$JR_EXPR_ID=26$

This error occurs everytime I use this expression $F{type}.contentEquals("XML") or even the .equals expression. With JDK6 it doesn't happen.

I've searched the web and I find a fix for this but for ecliplse in this url: https://community.jaspersoft.com/jasperreports-server/issues/3498

My dependencies are:

 <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>5.6.0</version>
        </dependency>
        <dependency>
            <groupId>net.sf.jasperreports</groupId>
            <artifactId>jasperreports-fonts</artifactId>
            <version>5.6.1</version>
        </dependency>
Alex K
  • 22,315
  • 19
  • 108
  • 236
  • Read [«this answer»](http://stackoverflow.com/a/26105217/2711488) and consider that this also applies to all kinds of code generators acting like an embedded compiler. If you look at its “Linked” section you will find tons of similar Jasper related questions… – Holger Dec 11 '14 at 10:06

1 Answers1

0

Well i didnt find a perfect solution for this, although to walktrough this issue I used .endsWith() instead of .equals. Works in this situation.