Tengo el siguiente codigo:
package sintitulo6;
import java.sql.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.view.*;
void jButton6_actionPerformed(ActionEvent e) {
try
{
String filename="C:/Documents and Settings/humberto/report1.jasper";
Connection c;
ResultSet rs;
Statement d;
String ps;
String str = "jdbc:odbc:PEMPLEADO2";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
c = DriverManager.getConnection(str);
Map m=new HashMap();
m.putAll(m);
JasperPrint j=JasperFillManager.fillReport(filename,m,c);
JasperViewer jv=new JasperViewer(j,true);
jv.show();
}
y me sale el siguiente error:
java.io.InvalidClassException: net.sf.jasperreports.engine.base.JRBaseReport; local class incompatible: stream classdesc serialVersionUID = 10200, local class serialVersionUID = 10001
at java.io.ObjectStreamClass.initNonProxy(ObjectStrea mClass.java:463)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1435)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:324)
at net.sf.jasperreports.engine.util.JRLoader.loadObje ct(JRLoader.java:85)
at net.sf.jasperreports.engine.JasperFillManager.fill Report(JasperFillManager.java:161)
at sintitulo6.Marco1.jButton6_actionPerformed(Marco1. java:494)
at sintitulo6.Marco1_jButton6_actionAdapter.actionPer formed(Marco1.java:604)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.act ionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.jav a:5100)
at java.awt.Component.processEvent(Component.java:489 7)
at java.awt.Container.processEvent(Container.java:156 9)
at java.awt.Component.dispatchEventImpl(Component.jav a:3615)
at java.awt.Container.dispatchEventImpl(Container.jav a:1627)
at java.awt.Component.dispatchEvent(Component.java:34 77)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3128)
at java.awt.Container.dispatchEventImpl(Container.jav a:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606 )
at java.awt.Component.dispatchEvent(Component.java:34 77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 456)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:100)
NESTED BY :
java.io.InvalidClassException: net.sf.jasperreports.engine.base.JRBaseReport; local class incompatible: stream classdesc serialVersionUID = 10200, local class serialVersionUID = 10001
at java.io.ObjectStreamClass.initNonProxy(ObjectStrea mClass.java:463)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1435)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:324)
at net.sf.jasperreports.engine.util.JRLoader.loadObje ct(JRLoader.java:85)
at net.sf.jasperreports.engine.JasperFillManager.fill Report(JasperFillManager.java:161)
at sintitulo6.Marco1.jButton6_actionPerformed(Marco1. java:494)
at sintitulo6.Marco1_jButton6_actionAdapter.actionPer formed(Marco1.java:604)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.act ionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.jav a:5100)
at java.awt.Component.processEvent(Component.java:489 7)
at java.awt.Container.processEvent(Container.java:156 9)
at java.awt.Component.dispatchEventImpl(Component.jav a:3615)
at java.awt.Container.dispatchEventImpl(Container.jav a:1627)
at java.awt.Component.dispatchEvent(Component.java:34 77)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3128)
at java.awt.Container.dispatchEventImpl(Container.jav a:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606 )
at java.awt.Component.dispatchEvent(Component.java:34 77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 456)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:100)
NESTED BY :
net.sf.jasperreports.engine.JRException: Error loading object from file : C:\Documents and Settings\humberto\report1.jasper
at net.sf.jasperreports.engine.util.JRLoader.loadObje ct(JRLoader.java:89)
at net.sf.jasperreports.engine.JasperFillManager.fill Report(JasperFillManager.java:161)
at sintitulo6.Marco1.jButton6_actionPerformed(Marco1. java:494)
at sintitulo6.Marco1_jButton6_actionAdapter.actionPer formed(Marco1.java:604)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.act ionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.jav a:5100)
at java.awt.Component.processEvent(Component.java:489 7)
at java.awt.Container.processEvent(Container.java:156 9)
at java.awt.Component.dispatchEventImpl(Component.jav a:3615)
at java.awt.Container.dispatchEventImpl(Container.jav a:1627)
at java.awt.Component.dispatchEvent(Component.java:34 77)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:3128)
at java.awt.Container.dispatchEventImpl(Container.jav a:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606 )
at java.awt.Component.dispatchEvent(Component.java:34 77)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 456)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:100)
Caused by: java.io.InvalidClassException: net.sf.jasperreports.engine.base.JRBaseReport; local class incompatible: stream classdesc serialVersionUID = 10200, local class serialVersionUID = 10001
at java.io.ObjectStreamClass.initNonProxy(ObjectStrea mClass.java:463)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1435)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:1521)
at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:324)
at net.sf.jasperreports.engine.util.JRLoader.loadObje ct(JRLoader.java:85)
... 26 more
bueno este error segun yo sale de la version de las librerias de jasperreport con jbuilder;actualmente estoy trabajando con el jbuilderx2000,jdk1.6.0_21,jre6 y iReport-3.7.5
Quisira saber la forma de como solucionarlo gracias...