"java.io.NotSerializableException: org.hibernate.util.MarkerObject" in Spring/Hibernate

Solution Verified - Updated -

Issue

Encountering an exception related to org.hibernate.util.MarkerObject when using Spring Web Flow

org.springframework.webflow.execution.repository.snapshot.SnapshotCreationException: Could not serialize flow execution; make sure all objects stored in flow or flash scope are serializable
        at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.<init>(SerializedFlowExecutionSnapshot.java:74)
        at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshotFactory.createSnapshot(SerializedFlowExecutionSnapshotFactory.java:70)
        ...
Caused by: java.io.NotSerializableException: org.hibernate.util.MarkerObject
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
        at org.hibernate.engine.StatefulPersistenceContext.serialize(StatefulPersistenceContext.java:1426)
        at org.hibernate.impl.SessionImpl.writeObject(SessionImpl.java:2018)
        ...
        at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.<init>(SerializedFlowExecutionSnapshot.java:69)

Environment

  • Spring Web Flow
  • Hibernate 3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content