为什么会得到编译错误查封/ codehaus/groovy/control/compiler ledexception ?

时间:2022-09-06 12:35:20

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

我正在尝试使用Ant脚本和Java编译我的JasperReports模板。我得到了这个错误:

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

There is nothing complex in the template, but I still can't compile.

模板中没有什么复杂的东西,但是我仍然不能编译。

4 个解决方案

#1


138  

You will have to set the language value in your template to Java. There are two ways you can do this:

您必须将模板中的语言值设置为Java。有两种方法可以做到:

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

    如果您正在使用iReport,请在报表检查器中选择根对象(与报表同名的那个)。然后在属性窗口中,从语言下拉菜单中选择Java。

  2. If you are editing the raw mark-up in the JRXML file, remove language="groovy" from the file altogether.

    如果您正在编辑JRXML文件中的原始标记,请将language="groovy"从文件中删除。

Then try to recompile - you should be sorted. :)

然后尝试重新编译——你应该被排序。:)

#2


6  

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

另一种解决方案是复制groovall -{version}。从groovy二进制发行版jar到应用程序的jar。

#3


1  

If you are using TIBCOJaspersoftStudio:

如果你正在使用TIBCOJaspersoftStudio:

  1. Download latest groovy 2.4.* jar from http://groovy-lang.org/download.html
  2. 下载最新的groovy 2.4。* jar从http://groovy-lang.org/download.html
  3. Unpack and get this file ./groovy-2.4.10/embeddable/groovy-all-2.4.10.jar
  4. 打开这个文件/groovy-2.4.10/可嵌入的/groovy-all-2.4.10.jar
  5. Put the jar in ./TIBCOJaspersoftStudio-6.3.1.final/plugins
  6. 把罐子放进。/TIBCOJaspersoftStudio-6.3.1.final/plugins
  7. Delete the old jar: ./TIBCOJaspersoftStudio-6.3.1.final/plugins/groovy-all_2.4.5.jar
  8. 删除旧的jar: ./TIBCOJaspersoftStudio-6.3.1.final/plugins/groovy-all_2.4.5.jar

#4


0  

Change the languge to java in JRXML (ex:- language="java") or add groovy*.jar to your project’s classpath.

在JRXML中将语言更改为java(例如:- language="java")或添加groovy*。jar到项目的类路径。

#1


138  

You will have to set the language value in your template to Java. There are two ways you can do this:

您必须将模板中的语言值设置为Java。有两种方法可以做到:

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

    如果您正在使用iReport,请在报表检查器中选择根对象(与报表同名的那个)。然后在属性窗口中,从语言下拉菜单中选择Java。

  2. If you are editing the raw mark-up in the JRXML file, remove language="groovy" from the file altogether.

    如果您正在编辑JRXML文件中的原始标记,请将language="groovy"从文件中删除。

Then try to recompile - you should be sorted. :)

然后尝试重新编译——你应该被排序。:)

#2


6  

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

另一种解决方案是复制groovall -{version}。从groovy二进制发行版jar到应用程序的jar。

#3


1  

If you are using TIBCOJaspersoftStudio:

如果你正在使用TIBCOJaspersoftStudio:

  1. Download latest groovy 2.4.* jar from http://groovy-lang.org/download.html
  2. 下载最新的groovy 2.4。* jar从http://groovy-lang.org/download.html
  3. Unpack and get this file ./groovy-2.4.10/embeddable/groovy-all-2.4.10.jar
  4. 打开这个文件/groovy-2.4.10/可嵌入的/groovy-all-2.4.10.jar
  5. Put the jar in ./TIBCOJaspersoftStudio-6.3.1.final/plugins
  6. 把罐子放进。/TIBCOJaspersoftStudio-6.3.1.final/plugins
  7. Delete the old jar: ./TIBCOJaspersoftStudio-6.3.1.final/plugins/groovy-all_2.4.5.jar
  8. 删除旧的jar: ./TIBCOJaspersoftStudio-6.3.1.final/plugins/groovy-all_2.4.5.jar

#4


0  

Change the languge to java in JRXML (ex:- language="java") or add groovy*.jar to your project’s classpath.

在JRXML中将语言更改为java(例如:- language="java")或添加groovy*。jar到项目的类路径。