harry.clarkknovalent.com Posted September 7, 2007 Share Posted September 7, 2007 I've developed a report that has a scriptlet, which I can run okay in iReport. When I upload the report and the scriptlet jar to JasperServer it throws this exception: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: it/businesslogic/ireport/IReportScriptlet I'm using internal scriptlet support; my scriptlet is a subclass of IReportScriptlet. The scriptlet class in report.jrxml is reportScriptlet (doesn't seem to matter if it's fully qualified) I've looked through the forums and saw comments about putting the jar in the webapps/jasperserver/lib in the JS Tomcat, which I've done, no change. Any comments? Thanks. Link to comment Share on other sites More sharing options...
csbac Posted September 10, 2007 Share Posted September 10, 2007 Hi!You have to add the class it/businesslogic/ireport/IReportScriptlet to the classpath; it can be found in iReport-2.0.1/lib/iReport.jar. I haven't done it myself, yet, but according to the documentation you have to deploy this class (IReportScriptlet) as well, if you derive your class from it ... it's LGPL, so that's allowed.Obviously, the IReportScriplet is not part of JasperReports, but of iReport ... For first tries, you can just use the iReport.jar ;-) Maybe it is easier not to derive from IReportScriptlet, but from JRAbstractScriptlet or JRDefaultScriptlet instead. Hope this helps,Sebastian Link to comment Share on other sites More sharing options...
harry.clarkknovalent.com Posted September 10, 2007 Author Share Posted September 10, 2007 That did it, thanks. I had to put it in the webapps/jasperserver/lib. I saw the doc page you mentioned. I had included a different jar, from the forum talk. jasperreports-2.0.1 I think. Not necessary apparently. I also had to rebuild my scriptlet jar. Apparently an inner class is not included if you name only the enclosing class; you need to specify both class files on the jar cmd. Link to comment Share on other sites More sharing options...
csbac Posted September 10, 2007 Share Posted September 10, 2007 Yep, jar does only include the /given/ .class files, no dependencies. jasperreports-2.0.1.jar is necessary, but probably already included in your webapps classpath ... Sebastian Link to comment Share on other sites More sharing options...
kaymenji Posted April 15, 2008 Share Posted April 15, 2008 I encountered the same problem when I am uploading my .jrxml report file with a scriptlet class to ZuckerReports. I got this exception: java.lang.NoClassDefFoundError: it/businesslogic/ireport/IReportScriptlet I fixed it by copying iReport.jar file to sugarCRM/htdocs/modules/ZuckerReports/jasper folder. And it works! Link to comment Share on other sites More sharing options...
codysixthday Posted December 16, 2014 Share Posted December 16, 2014 JasperReport java.lang.NoClassDefFoundError: net/sf/jasperreports/Same problem with me. I am testing related ireport barcode generatorand jasper report barcode generator.I am able to ant compile sample.jrxml to sample.jasper using build script. But after that when i try to generate .jrprint and .pdf file from the .jasper file using java web application deployed in jboss-4.0.1sp1 i get the no class found error.I have not added jasperreports.jar to jboss/lib as it is not required. the jar goes in my projects .ear.I am stuck please help.Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now