Recently while creating report using Jasper Reports 3.5.2 I faced the issue with compilation error:
java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
It was quiet strange cause I'm using pure Java without Groovy.
I found solution on somebody's blog.
In order to solve mentioned issue simple edit your jrxml template and remove the language="groovy" attribute from jasperReport node.
Enjoy!
So simple :) As I understood - removing [language="groovy"] line set "language" variable to default value (let me guess - "java" ?).
ReplyDeleteThanks...
Deletethat works.
DeleteIn Spanish MUCHAS GRACIAS
DeleteThanks.. Solved my problem
DeleteThanks a lot, it worked.
DeleteIt works for me!
Deletethankx a lot... :)
ReplyDeleteAnother solution is to copy groovy-all-{version}.jar from the groovy binary distribution into the application's /WEB-INF/lib directory. The file is located in the /embeddable directory within the Groovy distribution. Cheers! :D
ReplyDeletethis is best solution than first one Thanks dude
DeleteAdd groovy-all-1.7.5.jar file in ur lib
You are great...Alternate solution worked for me after adding groovy jar file to my apache libraries and restarting services...Thank you very much..
DeleteThanks for the alternative solution!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks, very helpful. To add to suhaizal's comment, if you are using iReport you can get the Groovy JAR from it under ireport/modules/ext and copy that into your project.
ReplyDeleteVery, very helpful
ReplyDeleteI love you all!!!
Thank's a lot
ReplyDeleteReally helpful thanks for sharing :)
ReplyDeleteThanks from me to ;)
ReplyDeleteTake care about your subreports.
ReplyDeleteIf you have a report with subreports, change the language parameter to 'Java'.
Cheers!
And this error type culd appear in other case if you are passing parameter for fill the report and have a directory route.
ReplyDeleteIf you have a directory route, you have to set this route without "".
Example:
Correct: SUBREPORT_DIR=C:\Documents\reports\
Incorrect: SUBREPORT_DIR="C:\Documents\reports\"
Thanks for all and code well!!
For any question about, feel free to contact me.
here u told to remove that double quotes,but that directory class is class="java.lang.String" so if i removed the quotes means then i am getting an error like syntax error
DeleteThanks for sharing!
ReplyDeleteThx
ReplyDeleteTHANKS FOR ALL
ReplyDeletethanks ! i've been stuck on this for hours! i did the second solution of copying the groovy jar into the web proj.
ReplyDeletethank you so much... that's really simple though.
ReplyDeletethank you so much!this problem confused me couple of hour
ReplyDeleteVisagan - SLIIT Sri Lanka
ReplyDeletethanks really did help with my stand alone project iacwebsysadmin and Taras Matyashovsky
and i got some interesting facts about generating reports from ireort + with the help of yours its working properly. :)
http://kristantohans.wordpress.com/2010/03/01/new-to-jasperreport-build-your-first-impressive-application-part-2/
THANKS SO MUCH!! AH!!!! :D
ReplyDeletevery helpfull....
ReplyDeleteCheers.......
Thank you so much
ReplyDeleteIf you are using Maven and want to explicitly include the Groovy jar file, you can insert this into your pom.xml file (pretend the '['s and ']'s are open and close angle brackets; this blog software stripped out the XML element tags):
ReplyDelete[dependency]
[groupId]org.codehaus.groovy[/groupId]
[artifactId]groovy-all[/artifactId]
[version]1.7.2[/version]
[/dependency]
I would think it possible to add:
[scope]runtime[/scope]
...but when I did so, the jar file was not downloaded by maven.
The Jasper POM file specifies an earlier version of groovy-all, but I'm going with the later version and have no compatibility problems yet.
- Keith
greate article.. very - very thank' alot.. visit my blog
ReplyDeletehttp://ekawidiarto.wordpress.com
Hi there, could you PLEASE help me here :
ReplyDeletein iReport3.7.4
I found 2 places that we can set the language one of them is for each report in repot properties and one of them is report
default language in iReport ,
also there are 3 laguages that u can set (groovy,javascript,java) if u set it to groovy and javascript it would have language="groovy" or language="javascript"
and it keeps this after save but if u set it to java it doesn't have language="java" and if u yourself add it manualy it would be removed after each save again...so ur report has this error because the language is null
"javax.servlet.ServletException: au.com.rmt.ca.exceptions.SystemException: net.sf.jasperreports.engine.JRException: Language "javascript" not supported by this report compiler.
Expecting "java" instead.
"
Gracias de verdad llevo una semana en esto, al verdad grax por el aporte.. De un programador a programador saludos..! :)
ReplyDeletemarvellous!!! thank you very much!!
ReplyDeleteThanks a lot. Great Help
ReplyDeletethanks :) it helps
ReplyDeleteSos muy groso papá!
ReplyDeleteJasperReports declares its dependency to Groovy libraries as optional. You can find a complete explanation of what are the optional dependencies here: http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
ReplyDeletethank u very much sir.....
ReplyDeleteHi, thank you...
ReplyDeleteWhile im passing .jasper file as argument in java program it says FILENOTFOUND plz tell me how to pass .jasper file from our pacakage
ReplyDeleteUn buen aporte. no sabia como solucionarlo y este post milagroso me salvo la vida.
ReplyDeleteGracias!!!
thank you soo much dear friend..
ReplyDeleteThanx dear...
ReplyDeleteImran Soomro
thank you, I spend my time in other sites, and you are very simple in your answer.
ReplyDeleteIt has been more than 6 hour I was searching for the solution and finally I came up to this site. Thank you very much.....
ReplyDeletethanks :)
ReplyDeleteTHANK YOU SOO MUCH GUY I WAS ON THIS ISSUE SINCE THE MORNING
ReplyDeletegrazie :)
ReplyDeleteThanks a lot brother
ReplyDeleteThanks!
ReplyDeleteThnx!
ReplyDeleteHi!
ReplyDeleteI did as you say, and I get new exception (it's too long so I copy a little), can you help me?
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2016)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:757)
Thank you for the post, it was great to find the answer pretty quickly.
ReplyDeleteSo, how to configure iReport to not include the language="groovy" definition in any new report??
Regards,
I also got this error...
ReplyDeleteException in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillBandNoOverflow(JRVerticalFiller.java:438)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnHeader(JRVerticalFiller.java:481)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:265)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:127)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:938)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:860)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:84)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:540)
thanks a lot
ReplyDeleteThanks for your excellent solution
ReplyDeleteThanks for removing groovy jar from my project.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteGracias!!! funcionó :D
ReplyDeletethanks a lot! it works
ReplyDeletethanks
ReplyDeletethank you so much.. it was so simple?? thanks a ton :)
ReplyDeleteyou save my time sir :)
ReplyDeletethx
ReplyDeletesliit sri lanka
ReplyDeletei tried all above solutions but it didnt help any thing to my jsp i report
java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.GroovyCategorySupport.getCategoryNameUsage(Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicInteger;
very helpful thank you very much
ReplyDeletejust removing language ="groovy" in the xml of jasper
ReplyDeleteSimple but very helpful, Thanks v.much
Thank you, this have worked perfectly for me !
ReplyDeleteI am facing similar error with Jasper Studio Pro 6.2.0final
ReplyDeleteBelow is trace:
java.lang.NoClassDefFoundError: net/sf/jasperreports/components/items/fill/FillItemData
at com.jaspersoft.jasperreports.tibco.maps.fill.TibcoMapFillFactory.toFillComponent(TibcoMapFillFactory.java:23)
at net.sf.jasperreports.engine.fill.JRFillComponentElement.(JRFillComponentElement.java:72)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.visitComponentElement(JRFillObjectFactory.java:1704)
at net.sf.jasperreports.engine.base.JRBaseComponentElement.visit(JRBaseComponentElement.java:81)
at net.sf.jasperreports.engine.JRAbstractObjectFactory.getVisitResult(JRAbstractObjectFactory.java:88)
at net.sf.jasperreports.engine.fill.JRFillElementGroup.(JRFillElementGroup.java:82)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.(JRFillElementContainer.java:89)
at net.sf.jasperreports.engine.fill.JRFillBand.(JRFillBand.java:121)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getBand(JRFillObjectFactory.java:522)
at net.sf.jasperreports.engine.fill.JRFillSection.(JRFillSection.java:74)
at net.sf.jasperreports.engine.fill.JRFillObjectFactory.getSection(JRFillObjectFactory.java:498)
at net.sf.jasperreports.engine.fill.JRBaseFiller.(JRBaseFiller.java:254)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:69)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:57)
at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:201)
at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:216)
at net.sf.jasperreports.engine.fill.BaseFillHandle.(BaseFillHandle.java:74)
at net.sf.jasperreports.engine.fill.AsynchronousFillHandle.(AsynchronousFillHandle.java:97)
at net.sf.jasperreports.engine.fill.AsynchronousFillHandle.(AsynchronousFillHandle.java:86)
at net.sf.jasperreports.engine.fill.AsynchronousFillHandle.createHandle(AsynchronousFillHandle.java:188)
at com.jaspersoft.studio.editor.preview.view.control.ReportControler$5.run(ReportControler.java:377)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.components.items.fill.FillItemData cannot be found by com.jaspersoft.studio.tibcomaps_6.2.0.final
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 22 more
Although i can see the JAR related to this class is included. But still can't found. Can someone please explain ???
Congratulations!!!!! This works fine !!! (remove groovly from jrxml)
ReplyDeleteworking...
ReplyDelete
ReplyDeleteorg.codehaus.groovy
groovy-all
2.4.10