Results 1 to 10 of 10
  1. #1
    sj_1188 is offline Member
    Join Date
    Dec 2008
    Posts
    4
    Rep Power
    0

    Post help with calling jasper reports from java code (am using netbeans)

    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 ry 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.:)

  2. #2
    Byapti is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default

    Hi,
    I think the JasperReports article on
    aspalliance.com/1140_Creating_Report_Using_JasperReports.all
    may be helpful in this discussion.

    This popular white paper is written by a software engineer from our organization Mindfire Solutions (mindfiresolutions.com).

    I hope you find it useful!

    Cheers,
    Byapti

  3. #3
    sj_1188 is offline Member
    Join Date
    Dec 2008
    Posts
    4
    Rep Power
    0

    Default

    hey tnx but i am having a problem on how to add the jar files to one's project classpath in netbeans. Can u tell me dat if u can?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Right click on the project and go to properties. Click on libraries and then Compile. On that you can add jar file or any folder.

  5. #5
    sj_1188 is offline Member
    Join Date
    Dec 2008
    Posts
    4
    Rep Power
    0

    Default

    well i did that and I'm still getting the same error. Can someone help me out plz.... my project's stuck coz I'm finding it difficult to create reports in java. can u recommend any other software for easily creating reports in java. shud i post this under some other section. am a newbie to the forum. thnx a lot

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  7. #7
    sj_1188 is offline Member
    Join Date
    Dec 2008
    Posts
    4
    Rep Power
    0

    Default

    These are the jar files I added to the project classpath following the instructions you gave me on how to add them in netbeans.

    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

    I downloaded them all from here:
    commons.apache.org/components.html
    Whats wrong?

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    To add jar files(packages) in NetBeans, right click on the project and click on the properties. Click on Libraries and then Compile tab. You can add jar files from there into your project.

  9. #9
    Simon Mcrom is offline Member
    Join Date
    Dec 2010
    Posts
    4
    Rep Power
    0

    Default Problem calling ireport with java

    hi there. i'm new with ireport. can any one help me how to call an ireport with java. i'm using netbeans IDE 6.9.1 and ireport 3.7.6. what are the ireport jars needed to be added in my java project libraries? xalan is the only jar available in ireports 3.7.6 lib.

  10. #10
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Simon, please do not hijack an old thread with a new question but rather create a new thread and ask your new question in it. Feel free to link to this thread if you desire. I am now locking this thread. Please private message me if you have any questions.

Similar Threads

  1. Netbeans 6.1 Crystal Reports plugin
    By Ch4os in forum NetBeans
    Replies: 0
    Last Post: 11-24-2008, 01:57 PM
  2. JSP and Jasper Report in Netbeans 6.1
    By ShatireAzam in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 11-08-2008, 10:43 AM
  3. Jasper Reports
    By sunjavaboy in forum Advanced Java
    Replies: 0
    Last Post: 10-28-2008, 10:33 PM
  4. how to use Jasper Reports in JSP
    By JavaEmpires in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 08-20-2008, 03:54 PM
  5. Slow reports in Netbeans
    By Alan in forum NetBeans
    Replies: 1
    Last Post: 05-29-2007, 04:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •