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

查看:31
本文介绍了为什么会出现编译错误“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.

推荐答案

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

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

  1. 如果您正在使用 iReport, 在您的 Report Inspector 中选择根对象(与您的报告同名的对象).然后在属性窗口中,从语言下拉菜单中选择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天全站免登陆