Why am I getting a compilation error "org / codehaus / groovy / control / CompilationFailedException"?

I am trying to compile my JasperReports template using Ant script and Java. I get this error:

jasper java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException 

There is nothing complicated in the template, but I still can not compile.

+52
java compilation jasper-reports ant
Jan 20 2018-12-12T00:
source share
4 answers

You need to set the language value in your Java template. You can do this in two ways:

  • If you are using iReport, select the root object in your Report Inspector (one that has the same name as your report). Then, in the Properties window, select Java from the Languages ​​drop-down list.

  • If you are editing raw markup in a JRXML file, remove language="groovy" from the file.

Then try recompiling - you should be sorted. :)

+126
Jan 20 2018-12-12T00:
source share

Another solution is to copy groovy -all- {version} .jar from the groovy binary distribution to the application.

+5
Apr 17 '13 at 12:25
source share

If you are using TIBCOJaspersoftStudio:

  • Download the latest groovy 2.4. * jar from http://groovy-lang.org/download.html
  • Unzip and get this file. / groovy -2.4.10 / embeddable / groovy -all-2.4.10.jar
  • Put the can in. / TIBCOJaspersoftStudio -6.3.1.final/plugins
  • Delete the old jar: ./ TIBCOJaspersoftStudio-6.3.1.final/plugins/ groovy-all_2.4.5.jar
+1
Apr 11 '17 at 19:21
source share

Change the language to java in JRXML (ex: - language = "java") or add groovy *. jar in your way to project classes.

0
Nov 11 '14 at 5:29
source share



All Articles