stacktracejava.io.NotSerializableException: java.lang.Object

Spring JIRA | Mauricio Noda | 7 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    If a Spring bean in flow scope is annotated with @Secured, the following exception is thrown when Spring Web Flow tries to serialize the scope: 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) at org.springframework.webflow.execution.repository.snapshot.AbstractSnapshottingFlowExecutionRepository.snapshot(AbstractSnapshottingFlowExecutionRepository.java:75) at org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.putFlowExecution(DefaultFlowExecutionRepository.java:123) at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:165) Truncated. see log file for complete stacktracejava.io.NotSerializableException: java.lang.Object at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) Truncated. see log file for complete stacktrace Probably the same issue reported in SPR-6680.

    Spring JIRA | 7 years ago | Mauricio Noda
    stacktracejava.io.NotSerializableException: java.lang.Object
  2. 0

    If a Spring bean in flow scope is annotated with @Secured, the following exception is thrown when Spring Web Flow tries to serialize the scope: 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) at org.springframework.webflow.execution.repository.snapshot.AbstractSnapshottingFlowExecutionRepository.snapshot(AbstractSnapshottingFlowExecutionRepository.java:75) at org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.putFlowExecution(DefaultFlowExecutionRepository.java:123) at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:165) Truncated. see log file for complete stacktracejava.io.NotSerializableException: java.lang.Object at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) Truncated. see log file for complete stacktrace Probably the same issue reported in SPR-6680.

    Spring JIRA | 7 years ago | Mauricio Noda
    stacktracejava.io.NotSerializableException: java.lang.Object

    Root Cause Analysis

    1. stacktracejava.io.NotSerializableException

      java.lang.Object

      at java.io.ObjectOutputStream.writeObject0()
    2. Java RT
      ObjectOutputStream.writeObject0
      1. java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
      2. java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      3. java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      4. java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      5. java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      5 frames