在Spring WebFlow中获取SnapshotNotFoundException



我在生产环境中遇到org.springframework.webflow.execution.repository.snapshot.SnapshotNotFound异常,但是我无法在开发环境中复制此问题。对此的任何帮助将不胜感激

网址:-/path?execution=e5s6

我还定义了最大快照

<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry" >
<webflow:flow-execution-listeners>
<webflow:listener ref="loggingListener"/>
</webflow:flow-execution-listeners>
<webflow:flow-execution-repository max-executions="5" max-execution-snapshots="50" />
</webflow:flow-executor>

和错误堆栈跟踪在这里

org.springframework.webflow.execution.repository.snapshot.SnapshotNotFoundException: No flow execution snapshot could be found with id '7'; 
perhaps the snapshot has been removed? at 
org.springframework.webflow.execution.repository.impl.SimpleFlowExecutionSnapshotGroup.getSnapshot(SimpleFlowExecutionSnapshotGroup.java:73) at 
org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.getFlowExecution(DefaultFlowExecutionRepository.java:111) at 
org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:168) at 
org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:228) at 
org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174) at

我想我发现了问题,Spring Webflow 每次都会增加快照,例如url?execute = e1s1, e1s2.....e1s10.

现在在 URL 中,如果我们手动输入 url?execution=e1s9 没有错误,但如果我们尝试url?execution=e1s3,它会给出异常。我想春天的网络流在内存中保留了很少的快照

此处的错误堆栈

Caused by: org.springframework.webflow.execution.repository.FlowExecutionRestorationFailureException: A problem occurred restoring the flow execution with key 'e7s5'
at org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.getFlowExecution(DefaultFlowExecutionRepository.java:113)
at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:168)
at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:228)
at org.springframework.webflow.mvc.servlet.FlowController.handleRequest(FlowController.java:174)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
at com.czen.app.framework.CZenDispatcherServlet.doDispatch(CZenDispatcherServlet.java:102)
... 73 more  Caused by: org.springframework.webflow.execution.repository.snapshot.SnapshotNotFoundException: No flow execution snapshot could be found with id '5'; perhaps the snapshot has been removed?
at org.springframework.webflow.execution.repository.impl.SimpleFlowExecutionSnapshotGroup.getSnapshot(SimpleFlowExecutionSnapshotGroup.java:73)
at org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.getFlowExecution(DefaultFlowExecutionRepository.java:111)
... 79 more

最新更新