You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Lefevre, Daniel" <da...@siemens.com> on 2005/12/01 16:00:50 UTC

Serialization problem with nightly builds

 
Hello,
 
When I go from MyFaces 1.1.1 to a nightly build (20051130 for example),
I get many NotSerializableException.
I solved the problem by making some fields transient in my backing bean.

Anyway, I have some fields that I cannot make transient because they are
initialized in the configuration file by using the
org.springframework.web.jsf.DelegatingVariableResolver mechanism. 
 
For those cases, I still have the following exception:
ERROR - [01 Dec 2005 15:11:31,316] | WebApp1 |
JspStateManagerImpl.serializeView(512) | Could not serialize state:
org.springframework.beans.factory.support.DefaultListableBeanFactory
java.io.NotSerializableException:
org.springframework.beans.factory.support.DefaultListableBeanFactory
 at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
 at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13
32)
 at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
....
 
Then 2 questions:
- Is it normal that NotSerializableException come suddenly in the
nightly builds?
- How can I solve the problem for the fields that are initialized in the
configuration file?
 
Bye, Dan

Re: Serialization problem with nightly builds

Posted by Mathias Brökelmann <mb...@googlemail.com>.
I assume that you are using server side state saving? We changed the
implementation for this recently and it now serializes the state by
default into the session. Objects which are stored in session should
be serializable. Nevertheless you can fix that by using the new
context parameter org.apache.myfaces.SERIALIZE_STATE_IN_SESSION in
your web.xml and set it to false (it´s true by default) and the state
of the views are not serialized in the session anymore.

2005/12/1, Lefevre, Daniel <da...@siemens.com>:
>
>
>
> Hello,
>
> When I go from MyFaces 1.1.1 to a nightly build (20051130 for example), I
> get many NotSerializableException.
> I solved the problem by making some fields transient in my backing bean.
> Anyway, I have some fields that I cannot make transient because they are
> initialized in the configuration file by using the
> org.springframework.web.jsf.DelegatingVariableResolver
> mechanism.
>
> For those cases, I still have the following exception:
> ERROR - [01 Dec 2005 15:11:31,316] | WebApp1 |
> JspStateManagerImpl.serializeView(512) | Could not
> serialize state:
> org.springframework.beans.factory.support.DefaultListableBeanFactory
> java.io.NotSerializableException:
> org.springframework.beans.factory.support.DefaultListableBeanFactory
>  at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
>  at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
>  at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
> ....
>
> Then 2 questions:
> - Is it normal that NotSerializableException come suddenly in the nightly
> builds?
> - How can I solve the problem for the fields that are initialized in the
> configuration file?
>
> Bye, Dan


--
Mathias