Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JasperReport  RSS feed

 
Antonio Ten�rio
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.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure the scriptlet is in the classpath?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!