To gerando um relatorio com o IReports + Jasper
montei minha classe conforme exemplo do guj, ele gera o arquivo pdf , ms
na hora de mostrar da esse erro ai
[code]
java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:729
)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:251)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:12
8)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:10
6)
at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1249)
at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:171)
at net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:161)
at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:2
97)
at fontes.RelatorioVendas.geraRelatorio(RelatorioVendas.java:52)
at telas.TelaRelatorio$Controle.actionPerformed(TelaRelatorio.java:77)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
67)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1820)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:258)
at java.awt.Component.processMouseEvent(Component.java:5021)
at java.awt.Component.processEvent(Component.java:4818)
at java.awt.Container.processEvent(Container.java:1380)
at java.awt.Component.dispatchEventImpl(Component.java:3526)
at java.awt.Container.dispatchEventImpl(Container.java:1437)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
at java.awt.Container.dispatchEventImpl(Container.java:1423)
at java.awt.Window.dispatchEventImpl(Window.java:1566)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:190)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
NESTED BY :
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:729
)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:251)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:12
8)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:10
6)
at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1249)
at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:171)
at net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:161)
at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:2
97)
at fontes.RelatorioVendas.geraRelatorio(RelatorioVendas.java:52)
at telas.TelaRelatorio$Controle.actionPerformed(TelaRelatorio.java:77)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
67)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1820)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:258)
at java.awt.Component.processMouseEvent(Component.java:5021)
at java.awt.Component.processEvent(Component.java:4818)
at java.awt.Container.processEvent(Container.java:1380)
at java.awt.Component.dispatchEventImpl(Component.java:3526)
at java.awt.Container.dispatchEventImpl(Container.java:1437)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
at java.awt.Container.dispatchEventImpl(Container.java:1423)
at java.awt.Window.dispatchEventImpl(Window.java:1566)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:190)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
NESTED BY :
net.sf.jasperreports.engine.JRException: Error loading object from file : …\fon
tes\RelVendas.pdf
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:13
3)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:10
6)
at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1249)
at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:171)
at net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:161)
at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:2
97)
at fontes.RelatorioVendas.geraRelatorio(RelatorioVendas.java:52)
at telas.TelaRelatorio$Controle.actionPerformed(TelaRelatorio.java:77)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
67)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1820)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:258)
at java.awt.Component.processMouseEvent(Component.java:5021)
at java.awt.Component.processEvent(Component.java:4818)
at java.awt.Container.processEvent(Container.java:1380)
at java.awt.Component.dispatchEventImpl(Component.java:3526)
at java.awt.Container.dispatchEventImpl(Container.java:1437)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3214
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2929)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2859)
at java.awt.Container.dispatchEventImpl(Container.java:1423)
at java.awt.Window.dispatchEventImpl(Window.java:1566)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:190)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Caused by: java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:729
)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:251)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:12
8)
… 30 more
–> 5[/code]
se alguem souber, por favor me ajude