Estoy mejorando una aplicación y me he encontrado con un problema a mitad de camino.
Tengo la instancia de una clase que debo almacenar en una Oracle 9i para poder recuperarla de nuevo. La clase de guarda con el método writeObject() y se recupera con el readObject. Dentro de la clase, uno de los atributos es del tipo Date y cuando intento recuperarlo, me sale este error:
Código:
En algunos foros me han dado soluciones del tipo añadir la serialVersionUID a pelo, pero esto tampoco ha funcionado y ya empiezo a estar desesperado. Gracias java.io.InvalidClassException: java.util.Date; local class incompatible: stream classdesc serialVersionUID = 7523895402267505689, local class serialVersionUID = 7523967970034938905 at java.io.ObjectStreamClass.initNonProxy(Unknown Source) at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) at java.io.ObjectInputStream.readClassDesc(Unknown Source) at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source) at java.io.ObjectInputStream.readClassDesc(Unknown Source) at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source) at java.io.ObjectInputStream.readObject0(Unknown Source) at java.io.ObjectInputStream.readObject(Unknown Source) at dumbo7.user.FiltroUsuario.readObject(FiltroUsuario.java:348) at dumbo7.user.FiltroUsuario.importFiltro(FiltroUsuario.java:436) at dumbo7.user.DumboUser.setPersonalData(DumboUser.java:250) at dumbo7.user.DumboUser.<init>(DumboUser.java:69) at dumbo7.inicio.GestorInicio.loginDumbo(GestorInicio.java:81) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at atica.frameweb.manager.ManagerModule.doMethod(ManagerModule.java:611) at atica.frameweb.manager.ManagerModule.doObjectDBMethod(ManagerModule.java:371) at atica.frameweb.manager.ManagerModule.doObject(ManagerModule.java:261) at atica.frameweb.manager.ManagerModule.doActions(ManagerModule.java:201) at atica.frameweb.manager.HttpServletManager.service(HttpServletManager.java:122) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:420) at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:134) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Unknown Source)