为什么我会收到编译错误“org / codehaus / groovy / control / CompilationFailedException”? [英] Why do I get compilation error "org/codehaus/groovy/control/CompilationFailedException"?

查看:1849
本文介绍了为什么我会收到编译错误“org / codehaus / groovy / control / CompilationFailedException”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Ant脚本和Java编译我的JasperReports模板。我收到此错误:

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

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

模板中没有任何复杂的东西,但我仍然无法编译。

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

推荐答案

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

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


  1. 如果您使用 iReport,选择根报表检查器中的对象(与您的报表同名的对象)。然后在 Properties 窗口中,从 Languages 下拉列表中选择 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.

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

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

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

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

这篇关于为什么我会收到编译错误“org / codehaus / groovy / control / CompilationFailedException”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆