Eclipse - Jasper报告不编译(java.lang.NoClassDefFoundError:org / apache / commons / digester / Digester) [英] Eclipse - Jasper report not compiling (java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester)

查看:363
本文介绍了Eclipse - Jasper报告不编译(java.lang.NoClassDefFoundError:org / apache / commons / digester / Digester)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过Eclipse ide生成一个jasper报告,但是当我执行以下代码行时:

  jasperReport = JasperCompileManager.compileReport(reports / samplereport.jrxml); 

我收到以下错误:

 线程main中的异常java.lang.NoClassDefFoundError:org / apache / commons / digester / Digester 
在net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java :146)

我已经将apache common digester jar添加为项目库,但似乎没有做出改变。
注意:我来自一个java新手(即Ive一个.NET背景),所以我很有可能做一些非常明显的事情。

解决方案

你可能会丢失一些罐子。尝试添加任何版本的这些。



jasperreports-.jar;

jasperreports-javaflow.jar;

commons -beanutils.jar;

commons-collections.jar;

commons-logging.jar;

commons-digester.jar


I am trying to generate a jasper report via the Eclipse ide, however when I execute the following line of code:

jasperReport = JasperCompileManager.compileReport("reports/samplereport.jrxml");

I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:146)

I have added the apache common digester jar as a project library but it does not seem to make a difference. NOTE: I am from a java novice (i.e. Ive a .NET background,) so I am very likely doing something really obvious!

解决方案

you may be missing some jars. try to add these ones with any version.

jasperreports-.jar;
jasperreports-javaflow.jar;
commons-beanutils.jar;
commons-collections.jar;
commons-logging.jar;
commons-digester.jar

这篇关于Eclipse - Jasper报告不编译(java.lang.NoClassDefFoundError:org / apache / commons / digester / Digester)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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