Erro ao visualizar o relatorio

4 respostas
wamarra

Pessoal,
Estou tentando gerar um relatório através da minha aplicação, mas dá o seguinte erro:

[color=red]Exception in thread “AWT-EventQueue-0” java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory[/color]

Com o iReport ele gera normalmente, mas na aplicação dá esse erro.
Alguém sabe o porque?
Vlw!

4 Respostas

tecdanilo

Verifique se vc importou para sua aplicação todos pacotes do ireport necessarias para gerar o relatorio.

Sempre que ocorreu este tipo de exceção foi porque não havia setado as bibliotecas necessárias no projeto.

Espero ter ajudado.

Té+

bandkanone

Tente verificar novamente o caminho passado do relatório

wamarra

tecdanilo:
Verifique se vc importou para sua aplicação todos pacotes do ireport necessarias para gerar o relatorio.

Sempre que ocorreu este tipo de exceção foi porque não havia setado as bibliotecas necessárias no projeto.

Espero ter ajudado.

Té+


Cara valeu funcionou :smiley:

Só que agora está dando outros erros:

java.io.StreamCorruptedException: invalid stream header

at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)

at java.io.ObjectInputStream.(ObjectInputStream.java:277)

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:62)

at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1226)

at net.sf.jasperreports.view.JRViewer.(JRViewer.java:128)

at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:117)

at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:253)

at TelaPrincipal.visualizarImpRelJuridico(TelaPrincipal.java:3601)

at TelaPrincipal.access$1200(TelaPrincipal.java:22)

at TelaPrincipal$13.actionPerformed(TelaPrincipal.java:870)

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.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)
NESTED BY :

java.io.StreamCorruptedException: invalid stream header

at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)

at java.io.ObjectInputStream.(ObjectInputStream.java:277)

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:62)

at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1226)

at net.sf.jasperreports.view.JRViewer.(JRViewer.java:128)

at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:117)

at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:253)

at TelaPrincipal.visualizarImpRelJuridico(TelaPrincipal.java:3601)

at TelaPrincipal.access$1200(TelaPrincipal.java:22)

at TelaPrincipal$13.actionPerformed(TelaPrincipal.java:870)

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.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)
NESTED BY :

net.sf.jasperreports.engine.JRException: Error loading object from file : lancamentosjuridico.pdf

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:89)

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:62)

at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1226)

at net.sf.jasperreports.view.JRViewer.(JRViewer.java:128)

at net.sf.jasperreports.view.JasperViewer.(JasperViewer.java:117)

at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:253)

at TelaPrincipal.visualizarImpRelJuridico(TelaPrincipal.java:3601)

at TelaPrincipal.access$1200(TelaPrincipal.java:22)

at TelaPrincipal$13.actionPerformed(TelaPrincipal.java:870)

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.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.io.StreamCorruptedException: invalid stream header

at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)

at java.io.ObjectInputStream.(ObjectInputStream.java:277)

at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)

 32 more

EXECUTADO COM SUCESSO (tempo total: 2 minutos 10 segundos)

O que será que está errado ainda?
Abraços

furutani

Olá

Poste algumas linhas antes e depois do fonte TelaPrincipal.java na linha 3601.

Criado 30 de novembro de 2007
Ultima resposta 1 de dez. de 2007
Respostas 4
Participantes 4