• 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
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

my jasper report viewer is generating blank pdf output

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

I have created a jasper report using jasperstudio 7.0. Report is woking fine inside the jasperstudio. But when call this jasper report from my java servlet, i am getting blank pdf ouput. jasperviewer shows "failed to load PDF document". when i export the PDF file, it is zero KB file. Below is my code with viewer and request your support to address my issue.

JasperReport jReport = (JasperReport) JRLoader.loadObjectFromFile("d:\\reports\\test.jasper");
JasperPrint jPrint = JasperFillManager.fillReport(jReport, null, myConnection);
JasperViewer.viewReport(jPrint,false);

I have below jar files in lib folder
commons-beanutils-1.9.4.jar
commons-codec.jar
commons-collections4-4.5.0.jar
commons-digester-2.1.jar
commons-logging-1.1.2.jar
jasperreports-7.0.0.jar
jasperreports-data-adapters-7.0.0.jar
jasperreports-groovy-7.0.0.jar
jasperreports-pdf-7.0.0.jar

I am using JDK-21.
jasper-error.png
[Thumbnail for jasper-error.png]
 
Ranch Hand
Posts: 345
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a wild guess bit could the account which its running on need a default print queue ?
 
ys reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nothing (i feel) with print queue as jasper generates PDF output and shows on browser. any other clue to understand the problem. I suspect the problem with jar (v 7.0.0) files placed in the lib folder vs JDK (21) I have. But the same jasper file is running well inside jasper studio.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic