Hi,
I have this error: "Could not serialize flow execution; make sure all objects stored in flow or flash scope are serializable"
what I wrong?
this is my flow:
this is my jsp view:<var name="attribute" class="it.cilab.uniba.recommender.model.Attribute"/>
<on-start>
<evaluate expression="attributeService.listAll()" result="flowScope.attribute" />
</on-start>
<view-state id="insertAttribute" model="attribute" view="insertAttribute">
</view-state>
</flow>
and this is listAll()<table>
<tr>
<td>
<table border="1" width="300px">
<tr><td>${flowScope.attribute}</td></tr>
</table>
</td>
</tr>
</table>
and this is the entire error log from console (in eclipse):@Override
public Iterator<String> listAll() {
int i;
String att = new String();
List<String> name = new ArrayList<String>();
int n;
n = attributeDAO.findAll().size();
for(i = 0 ; i < n ; i++){
att = attributeDAO.findAll().get(i).getName();
name.add(att);
}
return name.listIterator();
}
please someone can help me?
DEBUG: org.springframework.webflow.expression.DefaultExpr essionParserFactory - Initialized default Web Flow ExpressionParser org.springframework.webflow.expression.WebFlowOgnl ExpressionParser@2279ecf4
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImplFactory - Creating new execution of 'insertAttribute'
DEBUG: org.springframework.webflow.execution.factory.Cond itionalFlowExecutionListenerLoader - Loaded [1] of possible 1 listeners for this execution request for flow 'insertAttribute', the listeners to attach are list[org.springframework.webflow.persistence.HibernateF lowExecutionListener@3219ee8a]
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImpl - Starting execution in org.springframework.webflow.mvc.servlet.MvcExterna lContext@456c1227
DEBUG: org.springframework.webflow.engine.Flow - Creating [FlowVariable@33e136a8 name = 'attribute', valueFactory = [BeanFactoryVariableValueFactory@6cb6a34 type = Attribute]]
DEBUG: org.springframework.webflow.execution.ActionExecut or - Executing [EvaluateAction@34189cab expression = attributeService.listAll(), resultExposer = [ActionResultExposer@3bd5b945 result = flowScope.attribute, resultType = [null]]]
DEBUG: org.springframework.webflow.execution.AnnotatedAct ion - Putting action execution attributes map[[empty]]
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
Hibernate: select this_.id_attribute as id1_9_0_, this_.name as name9_0_ from item_db.attribute this_
DEBUG: org.springframework.webflow.execution.AnnotatedAct ion - Clearing action execution attributes map[[empty]]
DEBUG: org.springframework.webflow.execution.ActionExecut or - Finished executing [EvaluateAction@34189cab expression = attributeService.listAll(), resultExposer = [ActionResultExposer@3bd5b945 result = flowScope.attribute, resultType = [null]]]; result = success
DEBUG: org.springframework.webflow.engine.ViewState - Entering state 'insertAttribute' of flow 'insertAttribute'
DEBUG: org.springframework.webflow.conversation.impl.Sess ionBindingConversationManager - Putting conversation attribute 'name' with value insertAttribute
DEBUG: org.springframework.webflow.conversation.impl.Sess ionBindingConversationManager - Putting conversation attribute 'caption' with value null
DEBUG: org.springframework.webflow.conversation.impl.Sess ionBindingConversationManager - Putting conversation attribute 'description' with value null
DEBUG: org.springframework.webflow.engine.impl.FlowExecut ionImpl - Assigned key e1s1
DEBUG: org.springframework.webflow.execution.repository.i mpl.DefaultFlowExecutionRepository - Putting flow execution '[FlowExecutionImpl@36029483 flow = 'insertAttribute', flowSessions = list[[FlowSessionImpl@63644028 flow = 'insertAttribute', state = 'insertAttribute', scope = map['attribute' -> java.util.AbstractList$ListItr@4ab03512, 'viewScope' -> map[[empty]]]]]]' into repository
DEBUG: org.springframework.webflow.conversation.impl.Sess ionBindingConversationManager - Putting conversation attribute 'flowExecutionSnapshotGroup' with value org.springframework.webflow.execution.repository.i mpl.SimpleFlowExecutionSnapshotGroup@1b5268d7
DEBUG: org.springframework.web.servlet.DispatcherServlet - Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@7331f9 19
DEBUG: org.springframework.web.servlet.DispatcherServlet - Could not complete request
org.springframework.webflow.execution.repository.s napshot.SnapshotCreationException: Could not serialize flow execution; make sure all objects stored in flow or flash scope are serializable
at org.springframework.webflow.execution.repository.s napshot.SerializedFlowExecutionSnapshot.<init>(Ser ializedFlowExecutionSnapshot.java:74)
at org.springframework.webflow.execution.repository.s napshot.SerializedFlowExecutionSnapshotFactory.cre ateSnapshot(SerializedFlowExecutionSnapshotFactory .java:70)
at org.springframework.webflow.execution.repository.s napshot.AbstractSnapshottingFlowExecutionRepositor y.snapshot(AbstractSnapshottingFlowExecutionReposi tory.java:75)
at org.springframework.webflow.execution.repository.i mpl.DefaultFlowExecutionRepository.putFlowExecutio n(DefaultFlowExecutionRepository.java:115)
at org.springframework.webflow.executor.FlowExecutorI mpl.launchExecution(FlowExecutorImpl.java:135)
at org.springframework.webflow.mvc.servlet.FlowHandle rAdapter.handle(FlowHandlerAdapter.java:183)
...
Caused by: java.io.NotSerializableException: java.util.AbstractList$ListItr
...
GRAVE: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception
java.io.NotSerializableException: java.util.AbstractList$ListItr
...
thank you very much![]()


Reply With Quote
