Java 找不到 GroovyEvaluator
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18062314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GroovyEvaluator not found
提问by Jesus Alvarez
I'll try to do my PIE 3D report in iReport, in my struts.xml i got this to call my report.
我会尝试在iReport 中做我的 PIE 3D 报告,在我的 struts.xml 中我得到它来调用我的报告。
<action name="cargaReporte"
class="com.techera.eventos.action.MisVisitasAction"
method="cargaReporte">
<result name="success" type="jasper">
<param name="location">/WEB-INF/jsp/reportes/reporteMisVisitas.jasper</param>
<param name="dataSource">visitas</param>
<param name="format">PDF</param>
</result>
</action>
in my jsp i got this
在我的jsp中我得到了这个
<a href="cargaReporte">Reporte</a>
and when i clicked the link, the error is this
当我点击链接时,错误是这样的
java.lang.ClassNotFoundException: net.sf.jasperreports.compilers.GroovyEvaluator
at java.lang.ClassLoader.findClass(ClassLoader.java:522)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
...
Someone to tellme what I can do wrong?
有人告诉我我能做错什么?
I use the libraries:
我使用库:
groovy-all-1.7.5.jar
groovy-all-1.7.5.jar
- iText-2.1.7.jar
- jasperreports-4.5.0.jar
- jcommon-1.0.15.jar
- jfreechart-1.0.12.jar
- struts2-jasperreports-plugin-2.3.1.1.jar
- struts2-jquery-chart-plugin-3.3.1.jar
- iText-2.1.7.jar
- jasperreports-4.5.0.jar
- jcommon-1.0.15.jar
- jfreechart-1.0.12.jar
- struts2-jasperreports-plugin-2.3.1.1.jar
- struts2-jquery-chart-plugin-3.3.1.jar
回答by Orhun D.
Let me explain: if you're compiling your jasper report files (jrxml) with iReport-5.6.0 then you have to use jasperreports-5.6.0.jar at runtime..
让我解释一下:如果您使用 iReport-5.6.0 编译您的 jasper 报告文件 (jrxml),那么您必须在运行时使用 jasperreports-5.6.0.jar。
回答by Mahmoud Salah
I was able to resolve this by :
我能够通过以下方式解决这个问题:
- removing
language="groovy"
- (or) replacing
language="groovy"
withlanguage="java"
in myJRXML
file
- 去除
language="groovy"
- (或)在我的文件中替换
language="groovy"
为language="java"
JRXML
Don't forget to save and compile.
不要忘记保存和编译。