E ai pessoal…
To com um probleminha pra mostrar um relatorio em pdf na minha pagina, está lancçando uma exception e eu não faço a menor idéia do que possa estar causando o erro:
parte do codigo pra gerar o pdf:
JasperReport jReport = RelatorioAction.getReport"RelatorioPedidos");
HashMap<String,String> params = new HashMap<String,String>();
params.put("PathRelItens", "/br/com/toystore/reports/relDetalhesPedido.jasper");
JasperPrint report = JasperFillManager.fillReport(jReport, params, conn);
JasperExportManager.exportReportToPdfFile(report,"/br/com/teclogica/reports/relatItens.pdf");//nesta linha que acontece o erro.
...
O erro que gera é esse:
javax.servlet.ServletException: com/lowagie/text/DocumentException
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:294)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NoClassDefFoundError: com/lowagie/text/DocumentException
net.sf.jasperreports.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:183)
net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:283)
br.com.teclogica.toystore.controller.RelatorioAction.gerarRelatorioPdf(RelatorioAction.java:56)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)