Issue Details (XML | Word | Printable)

Key: SPR-3739
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Juergen Hoeller
Reporter: Graeme Rocher
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Framework

Cannot place objects created with ProxyFactoryBean into flow scope

Created: 23/Jul/07 08:27 AM   Updated: 03/Aug/07 06:41 PM   Resolved: 03/Aug/07 06:41 PM
Component/s: None
Affects Version/s: 2.0.6
Fix Version/s: 2.1 M4

Time Tracking:
Not Specified


 Description  « Hide

Putting a bean into flow/flash/conversation scope that is created with a ProxyFactoryBean results in the exception:

org.springframework.webflow.execution.repository.continuation.ContinuationCreationException: Could not serialize flow execution; make sure all objects stored in flow or flash scope are serializable; nested exception is java.io.NotSerializableException: org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry Caused by: java.io.NotSerializableException: org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302) at java.util.HashMap.writeObject(HashMap.java:985) at



Erwin Vervaet added a comment - 24/Jul/07 02:26 AM

I've CC'd Juergen on this.


Juergen Hoeller added a comment - 03/Aug/07 04:23 PM

A ProxyFactoryBean is generally not intended to be serializable; only a proxy that it builds is serializable. Hence I'll turn this into an enhancement request for making ProxyFactoryBean instances themselves serializable as well.

This is unfortunately a non-trivial problem that we can only properly address in Spring 2.1 M4 but not backport to Spring 2.0.7.

Juergen


Juergen Hoeller added a comment - 03/Aug/07 06:41 PM

ProxyFactoryBean and its superclasses and dependent objects are fully serializable now, as far as possible (i.e. as far as the target and interceptors are serializable as well).

This should be available in tomorrow's 2.1 M4 snapshot.

Juergen