0

I'm getting

Caused by: 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:75)
    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:126)
    at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:171)
    at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:228)
    at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:57)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
    ... 46 more
Caused by: java.io.NotSerializableException: org.springframework.binding.mapping.impl.DefaultMappingResults
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)

so that NotSerializableException completely eats root cause making it impossible to figure out what's happend. The not serializable DefaultMappingResults come from

"lastError" -> "org.springframework.webflow.engine.FlowInputMappingException: Errors occurred during input mapping in state 'openAgreement' of flow 'menu'; errors = [[SourceAccessError@226a8851 mapping = flowScope.securityCards.selectedRow.agreementId -> agreementId, code = 'evaluationException', error = true, errorCause = org.springframework.binding.expression.EvaluationException: An ELException occurred getting the value for expression 'flowScope.securityCards.selectedRow.agreementId' on context [class org.springframework.webflow.engine.impl.RequestControlContextImpl], originalValue = [null], mappedValue = [null]]]"

Not sure if it's related but the problem poped up after updating JSF from 2.1 to 2.2 but most likely there were no root error under 2.1

The problem somehwat resambles this one but not sure.

the openAgreement state:

<subflow-state id="openAgreement" subflow="menu">
    <on-entry>
        <evaluate expression="agreementService.init()" result="flowScope.agreementReadCriteria" />
    </on-entry>

    <input name="agreementReadCriteria" value="flowScope.agreementReadCriteria"/>

    <input name="agreementId" value="flowScope.securityCards.selectedRow.agreementId"/>
    <input name="currentBankId" value="flowScope.currentBankId"/>
    <input name="goToAgreement" value="true"/>

    <transition on="closeAgreement" to="securityCardsViewBasic">

    </transition>
</subflow-state>
user656449
  • 2,950
  • 2
  • 30
  • 43
  • Are agreementId, SelectedRow and SecurityCards serializable? Seems like one of them might not be – rptmat57 May 05 '16 at 03:23
  • all is serializable except DefaultMappingResults – user656449 May 05 '16 at 09:12
  • could you post the code of the "openAgreement" view of your "menu" flow? – rptmat57 May 05 '16 at 13:11
  • Older SWF versions are not compatible with JSF 2.2. Make sure you've the latest. Alternatively, just drop SWF altogether. Since JSF 2.2, new Faces Flows feature was introduced, hereby making SWF superfluous. – BalusC May 06 '16 at 07:48
  • yes, SWF is the latest - 2.4.2.RELEASE. And of course I'd never use it if I could, but, you know - corporate standards, bla bla – user656449 May 06 '16 at 08:05

0 Answers0