• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JasperReport

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

I am with problems in visualizing a JasperReport report, through of
one servlet. Look source code below:

byte[] bytes = null;

bytes =JasperRunManager.runReportToPdf(jasperReport,parameters,getConnection());
resp.setContentType("application/pdf");
resp.setContentLength(bytes.length);
ServletOutputStream ouputStream = resp.getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();

When I execute this stretch of code , more necessarily in the line:

bytes =JasperRunManager.runReportToPdf(jasperReport,parameters,getConnection());

the following exception is throw:
net.sf.jasperreports.engine.JRException: Error loading scriptlet class : VIVI1Scriptlet
.
.
.
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: VIVI1Scriptlet
Application does not obtain to load the VIVI1Scriptlet archive, what I
need to make to execute this example
Somebody knows why this occurring this error.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure the scriptlet is in the classpath?
 
reply
    Bookmark Topic Watch Topic
  • New Topic