• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

JasperReport

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Are you sure the scriptlet is in the classpath?
 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!