首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >春天的SnapshotNotFoundException,WebFlow

春天的SnapshotNotFoundException,WebFlow
EN

Stack Overflow用户
提问于 2018-06-07 07:27:32
回答 1查看 1.2K关注 0票数 0

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

网址:- /path?execution=e5s6

我也定义了最大快照

代码语言:javascript
复制
<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>

和这里的错误堆栈跟踪

代码语言:javascript
复制
    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
EN

回答 1

Stack Overflow用户

发布于 2018-06-07 12:19:39

我想我发现了这个问题,spring Webflow每次都会增加快照。url?execution = e1s1,e1s2.....e1s10

现在在URL中,如果我们手动输入url?execution=e1s9没有错误,但是如果我们尝试url?execution=e1s9,它将给出异常。我想spring webflow在内存中保留了很少的快照。

错误堆栈

代码语言:javascript
复制
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
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50735272

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档