Estou usando o JasperReport para exportar um relatório, que criei na ferramenta,de relatório…Já gerei o arquivo compilado .jasper …Estou me baseando em video aulas…mas não consegui exportar no java (JSF) está dando este erro o que falta ?? exporter.exportReport();
public RelatorioBean() {
this.context = FacesContext.getCurrentInstance();
this.response = (HttpServletResponse)
context.getExternalContext().getResponse();
}
public void exporterPdf() throws FileNotFoundException, JRException {
stream = this.getClass().getResourceAsStream("/Ireport/ireport_1.jrxml");
Map<String, Object> params = new HashMap<String, Object>();
params.put("funcionario.cpf", 2020);
baos = new ByteArrayOutputStream();
OutputStream saida = new FileOutputStream("sss.pdf");
JRExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, params);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, saida);
exporter.exportReport();
try {
JasperPrint print = JasperFillManager.fillReport("ireport_1.jasper", params, con);
} catch (JRException ex) {
Logger.getLogger(RelatorioBean.class.getName()).log(Level.SEVERE, null, ex);
}
O arquivo ponto jasper está no meu projeto compilado