Hibernate version:2.1.6
Hi I try to run a jasper report but when I do it i receive this error
07:46:04,304 ERROR HibernateInterceptor:47 - Exception in execute()
org.apache.jasper.JasperException: org/eclipse/jdt/internal/compiler/env/INameEnvironment
my jsp code look like this
HibernateQueryResultDataSource ds = (HibernateQueryResultDataSource) session.getAttribute("ds");
File reportFile = new File(application.getRealPath("/reports/unrestricted.jasper"));
Map parameters = new HashMap();
parameters.put("BaseDir", reportFile.getParentFile());
byte[] bytes = JasperRunManager.runReportToPdf(
reportFile.getPath(),
parameters,
ds);
response.setContentType("application/pdf");
response.setContentLength(bytes.length);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();
}
The ds object implements a JRDataSource interface.
Can tell wht´s wrong or where I found information.
Thanks
|