Ver Mensaje Individual
  #7 (permalink)  
Antiguo 17/09/2011, 15:29
Avatar de shujidan
shujidan
 
Fecha de Ingreso: abril-2011
Mensajes: 121
Antigüedad: 13 años, 8 meses
Puntos: 5
Respuesta: Porque me sigue marcando NotSerializableException

En mi código utilizo el MiDefaultListModel heredando a DefaultListModel porque necesitaba implementar la interface Serializable, pero no le agrego ni sobreescribo nada mas que el constructor con super así que en escencia sigue siendo DefaultListModel.
Esta clase no me da problemas pues ya he comprobado que el objeto si se guarda correctamente, no así con el ArrayList<JTabbedPane>
El ArrayList contiene JTabbedPanes cada uno con varias pestañas, un evento de tipo MouseListener que crea otra pestaña al hacer clic en alguna de ellas. Cada pestaña contiene un JTextArea con un KeyListener que guarda el ArrayList completo cuando se suelta una tecla.

Como solo incluye componentes swing el arraylist y tengo entendido que éstos ya son serializables sólo se me ocurre que tengo que serializar las interfaces pero no estoy seguro, alguien que me aclare esta duda porfavor.

Esto es lo que imprime el excepcion.getCause(); null (o sea no existente o desconocida)
Esto es lo que imprime el excepcion.getLocalizedMessage(); java.io.ObjectOutputStream
Esto es lo que imprime el excepcion.printStackTrace();

java.io.NotSerializableException: java.io.ObjectOutputStream
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unkn own Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unk nown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.awt.AWTEventMulticaster.save(Unknown Source)
at java.awt.Component.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknow n Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unk nown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.ArrayList.writeObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeWriteObject(Unknow n Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unk nown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at SupernotPanel$2.keyReleased(SupernotPanel.java:146 )
at java.awt.Component.processKeyEvent(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unkn own Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEv ent(Unknown Source)

at java.awt.DefaultKeyboardFocusManager.preDispatchKe yEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAsse rtions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent (Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPri vilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Última edición por shujidan; 17/09/2011 a las 17:57