• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

NetBeans:JasperReport --> Exception

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on a project that needs Jasper reporting, I have used the code fragment mentioned below to view the report in NetBeans 6.1 (the report is originally generated and compiled using iReport 3.6.0),my requirement is to print this report using a simple Swing application.

Code fragment:



But when I run this it gives an exception that I couldn't figure out.

Exception:



Thanks.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Oshadha,
The default JRXML created iReport is of type Groovy. You can check this by examining the JRXML File.

Change the language attribute value to "java" and try. Hope it will work

-Rakesh
 
John Wenn
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rakesh Enoch wrote:Hi Oshadha,
The default JRXML created iReport is of type Groovy. You can check this by examining the JRXML File.

Change the language attribute value to "java" and try. Hope it will work

-Rakesh



Thanks for the reply, I have fixed it in another way by injecting Groovy type (there's a specific jar file to do so)
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I added the appropriate groovy-all-1.5.5.jar to my project classpath, but I still cannot generate a pdf report.
This time, I get

Caused by: java.lang.NoClassDefFoundError: org/codehaus/groovy/control/Compilati
onFailedException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(....)

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ..........

you are using groovy language for your reports that's why you are getting this exception just change the language from the property option of the report to java this will fix the exception....

enjoyyyyyyyyyyyyyyyy........
 
Grazia Lassner
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am fine with using groovy as language for the reports. The problem was I was not importing the .jar properly in my app. I had to use the libray path in my orion-application.xml file like this: <library path="./shared-libs/poi-3.5-FINAL-20090928.jar" />
 
Kaustubh Sharma
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey I am using groovy-all-minimal-1.1-rc-3-javadoc and groovy-all-1.5.5-javadoc lib files and I am not getting any problem. hope this will help you also..

Kaustubh
 
Morning came much too soon and it brought along a friend named Margarita Hangover, and a tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic