ivan2007
Mar 27th, 2008, 05:54 PM
Hi,
I am having a problem with persisting an entity within a persistence context.
I get the following error:
org.springframework.webflow.execution.repository.c ontinuation.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.hibernate.util.MarkerObject
java.io.NotSerializableException: org.hibernate.util.MarkerObject
Why is it trying to serialize a org.hibernate.util.MarkerObject object?
I want to point out that all my objects implement Serializable.
I made a small test application to illustrate my issue.
The following is my flow definition:
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<persistence-context/>
<view-state id="step1" view="echtgenoot">
<on-render>
<evaluate expression="echtgenootFormAction.setupForm"/>
</on-render>
<transition on="next" to="confirmView">
<evaluate expression="echtgenootFormAction.bindAndValidate"/>
<evaluate expression="mainService.saveOrFind(echtgenoot)"/>
</transition>
</view-state>
<view-state id="confirmView" view="successAangifte"/>
<end-state id="end" view="externalRedirect:../testing/main"/>
<global-transitions>
<transition on="exit" to="end"/>
</global-transitions>
<bean-import resource="test-context.xml"/>
</flow>
test-context.xml :
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="echtgenootFormAction" class="org.springframework.webflow.action.FormAction">
<property name="formObjectClass" value="Echtgenoot" />
<property name="formObjectName" value="echtgenoot"/>
<property name="validator" ref="personValidator"/>
</bean>
</beans>
I am working on a major project which uses webflow extensively and this really needs to be fixed. Maybe I am doing something wrong.
Can someone help me out?
I am willing to share a small test application (which I've made to investigate this) if necessary.
Thanks in advance.
I am having a problem with persisting an entity within a persistence context.
I get the following error:
org.springframework.webflow.execution.repository.c ontinuation.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.hibernate.util.MarkerObject
java.io.NotSerializableException: org.hibernate.util.MarkerObject
Why is it trying to serialize a org.hibernate.util.MarkerObject object?
I want to point out that all my objects implement Serializable.
I made a small test application to illustrate my issue.
The following is my flow definition:
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<persistence-context/>
<view-state id="step1" view="echtgenoot">
<on-render>
<evaluate expression="echtgenootFormAction.setupForm"/>
</on-render>
<transition on="next" to="confirmView">
<evaluate expression="echtgenootFormAction.bindAndValidate"/>
<evaluate expression="mainService.saveOrFind(echtgenoot)"/>
</transition>
</view-state>
<view-state id="confirmView" view="successAangifte"/>
<end-state id="end" view="externalRedirect:../testing/main"/>
<global-transitions>
<transition on="exit" to="end"/>
</global-transitions>
<bean-import resource="test-context.xml"/>
</flow>
test-context.xml :
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="echtgenootFormAction" class="org.springframework.webflow.action.FormAction">
<property name="formObjectClass" value="Echtgenoot" />
<property name="formObjectName" value="echtgenoot"/>
<property name="validator" ref="personValidator"/>
</bean>
</beans>
I am working on a major project which uses webflow extensively and this really needs to be fixed. Maybe I am doing something wrong.
Can someone help me out?
I am willing to share a small test application (which I've made to investigate this) if necessary.
Thanks in advance.