Oi gente
jah fiz 3 tutoriais de geração de relatorio, mas os tres dão o mesmo erro,
aqui tah o código
public JasperPrint gerar() throws ExcRepositorio, ClassNotFoundException, SQLException{
JasperPrint rel = null;
try {
Connection con = new Conexao().getConexao();
HashMap map = new HashMap();
String arquivoJasper = "todos_os_objetos.jasper";
rel = JasperFillManager.fillReport(arquivoJasper, map, con);
} catch (JRException e) {
JOptionPane.showMessageDialog(null,e.getMessage());
}
return rel;
}
a execao que tah dando eh essa
Exception in thread "AWT-EventQueue-0" java.lang.Error: java.lang.reflect.InvocationTargetException
at org.jdesktop.application.ApplicationAction.actionFailed(ApplicationAction.java:859)
at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:665)
at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5517)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5282)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3984)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3819)
at javax.swing.plaf.basic.BasicInternalFrameUI$Handler.retargetMouseEvent(BasicInternalFrameUI.java:1547)
at javax.swing.plaf.basic.BasicInternalFrameUI$Handler.forwardMouseEvent(BasicInternalFrameUI.java:1479)
at javax.swing.plaf.basic.BasicInternalFrameUI$Handler.mouseReleased(BasicInternalFrameUI.java:1397)
at java.awt.Component.processMouseEvent(Component.java:5517)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5282)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3984)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:662)
... 36 more
Caused by: java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:476)
at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:242)
at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:420)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:404)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
at Relatorio.Relatorio.gerar(Relatorio.java:67)
at projetojar.ProjetojarView.GerarRelatrioObjeto(ProjetojarView.java:2041)
descupa postar a execao tão grande… mas eu não faço ideia do que ocorre.
muito obrigado pela atenção!
abraço!