java - Exception in Dynamic Report -
hi trying generate dynamic report in netbeans7 ide, java6, glassfish3.2 environment. creating project using java> web application. used below jars
commons-collections-3.2.1
commons-digester-2.0
dynamicreports-1.3.0
dynamicreports-adhoc-4.0.1
dynamicreports-core-4.0.1
itext-2.1.7
jasperreports-6.1.0
commons-logging-1.2
commons-logging-1.2-javadoc
common-lang3.jar
but getting exception in thread "main" java.lang.noclassdeffounderror: org/apache/commons/lang/validate
investigate issue , find have add
1)common-lang3.jar
2)and common-lang3.jar missing inside web-inf>lib ,
added mentioned jar , available in web-inf>lib. still facing same issue.
find below exception while running java file
run:
exception in thread "main" java.lang.noclassdeffounderror: org/apache/commons/lang/validate @ net.sf.dynamicreports.report.base.component.drlist.settype(drlist.java:78) @ net.sf.dynamicreports.report.base.component.drlist.<init>(drlist.java:50) @ net.sf.dynamicreports.report.base.drband.<init>(drband.java:41) @ net.sf.dynamicreports.report.base.drreport.init(drreport.java:113) @ net.sf.dynamicreports.report.base.drreport.<init>(drreport.java:97) @ net.sf.dynamicreports.report.builder.reportbuilder.<init>(reportbuilder.java:60) @ net.sf.dynamicreports.jasper.builder.jasperreportbuilder.<init>(jasperreportbuilder.java:95) @ net.sf.dynamicreports.report.builder.dynamicreports.report(dynamicreports.java:65) @ net.sf.dynamicreports.examples.adhoc.dynamicreporting.main(dynamicreporting.java:20) caused by: java.lang.classnotfoundexception: org.apache.commons.lang.validate @ java.net.urlclassloader$1.run(urlclassloader.java:202) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:190) @ java.lang.classloader.loadclass(classloader.java:306) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:301) @ java.lang.classloader.loadclass(classloader.java:247) ... 9 more java result: 1 build successful (total time: 2 seconds)
my code:
public class dynamicreporting{ public static void main(string args[]) throws drexception, filenotfoundexception{ jasperreportbuilder report= dynamicreports.report(); report.topdf(new fileoutputstream(new file("c:/report.pdf"))); system.out.print("report generated"); } }
can 1 suggest missing.thanks in advance
from dynamicreports-core-4.0.1
in jar list, can using 4.0.1 version, not need dynamicreports-1.3.0
this.
i downloaded dependencies below link,
http://sourceforge.net/projects/dynamicreports/files/dynamicreports/4.0.1/
and need run snippet of yours list of jars in project class path,
you can see not match yours mixing lots diff versions of jar.
note: jars can found under links.
Comments
Post a Comment