java.io.NotSerializableException when I try to write data to a file

Hello and thanks in advance.
I’m trying to write key-value record in a properties file, actually saves the data, but after a few seconds the error of communication.
the code it produces is:

			[color=#536ef4]

Properties pdatos = new Properties();
try{
String pruta = pnombrefichero.replace(“.”, “/”) + “.properties”;
InputStream pin = new FileInputStream( pruta);
pdatos.load(pin);
pdatos.setProperty(Clave, ValorDefecto);
FileOutputStream pfo = new FileOutputStream(pruta, true);
pdatos.store(pfo, null);
pfo.close();

			} catch (FileNotFoundException e){
				e.printStackTrace();
			}
			catch (SecurityException e){
				e.printStackTrace();
			}
			catch (IOException e) {
				e.printStackTrace();
			}

[/color]

but if I delete the recording, no failure occurs

			[color=#536ef4]

Properties pdatos = new Properties();
try{
String pruta = pnombrefichero.replace(“.”, “/”) + “.properties”;
InputStream pin = new FileInputStream( pruta);
pdatos.load(pin);
pdatos.setProperty(Clave, ValorDefecto);

//FileOutputStream pfo = new FileOutputStream(pruta, true);
//pdatos.store(pfo, null);
//pfo.close();

			} catch (FileNotFoundException e){
				e.printStackTrace();
			}
			catch (SecurityException e){
				e.printStackTrace();
			}
			catch (IOException e) {
				e.printStackTrace();
			}

[/color]

a piece of the trace:

Hibernate: select idiomas0_.ididiomas as ididiomas7_, idiomas0_.abreviatura as abreviat2_7_, idiomas0_.activo as activo7_, idiomas0_.fechacrea as fechacrea7_, idiomas0_.fechamodifica as fechamod5_7_, idiomas0_.imagen as imagen7_, idiomas0_.observaciones as observac7_7_, idiomas0_.titulo as titulo7_, idiomas0_.usuariocrea as usuarioc9_7_, idiomas0_.usuariomodifica as usuario10_7_ from public.idiomas idiomas0_
[color=#e71422]
jul 18, 2012 10:06:03 AM org.apache.catalina.core.StandardContext reload
Información: Ha comenzado la recarga de Contexto
[/facturaWeb]
jul 18, 2012 10:06:03 AM org.apache.catalina.session.StandardSession writeObject
Advertencia: No puedo serializar atributo de sesión com.vaadin.terminal.gwt.server.WebApplicationContext para sesión BC82CEB96771AF36246A8566D8FA241C
java.io.NotSerializableException: com.agedum.adminfw.view.CmpUsuarioLogado$2
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at java.util.LinkedList.writeObject(Unknown Source)
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 java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

[/color]

Thank!.

go, it seems to reload the apache in debug context as change the contents of a file within the application.

How I can tell apache / eclipse not reload the context when changing file?

thank you very much

Based on a quick glance: You can probably disable extra serialization of sessions over redeploy (or server restart) by uncommenting the “Manager” parameter in context.xml (if I remember correctly) of your Tomcat. If using Tomcat integration in Eclipse, see under “Servers” in the Project Explorer view.

EDIT: If you want to disable automatic redeploy and perform the deployment explicitly, there is an option for that in the properties of the server (cannot recall if in the Servers view or under Servers in the Project Explorer view).