• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

calling jasper reports from java

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all! I'm having a problem with calling jasper reports from my java application. I used iReport to create the jrxml report file and then wrote the necessay code to call it from my java app. I have imported the necessary packages and added the required jar files to my project classpath. I dont get any errors when compiling. But when i run the application and try to call the report, i get the following error:
"java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
at net.sf.jasperreports.engine.JasperCompileManager.
compileReport(JasperCompileManager.java:150)"
Am using netbeans6.1 and latest version of ireport.

I am confused since the commons/digester jar file has been added in the classpath. What am i doing wrong. please help me out. thanks.
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sj and welcome to Javaranch!

Firstly, can you please change your name in accordance to our naming policy.

Onto your question, can you post your CLASSPATH here? We might be able to spot a typo or some such
 
Sneha Jaiswal
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well,Martijn, as I said, I'm using Netbeans and so I added the zip files to my project classpath by right-clicking on it, choosing Properties->Libraries and specifying the respective paths under Compile tab.
These are the zip files I added:

commons-beanutils-1.8.0-bin.zip
commons-collections-3.2.1-bin.zip
commons-digester-1.8.zip
commons-logging-1.1.1-bin.zip
jasperreports-3.1.2.jar
xercesImpl.jar.zip

Am I correct in doing so?
 
Martijn Verburg
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, I don't use Netbeans but a couple of questions:

1.) Are you running program from within Netbeans?

2.) Is adding zip files to the CLASSPATH in Netbeans legitimate? I tend to add JAR files in Eclipse as opposed to zip.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic