【问题标题】:Web Flow crashes on appended variableWeb Flow 在附加变量上崩溃
【发布时间】:2012-08-08 21:41:12
【问题描述】:

我目前在使用 Spring Web Flows 2.0.7 时遇到问题,当提交变量时,webflow 崩溃。对应的 webflow 如下所示:

<flow xmlns="http://www.springframework.org/schema/webflow"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/webflow
                          http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

  <!-- some model, i use below -->
  <var name="register"
       class="org.zcore.conference.Registration" />

  <!-- my input id -->
  <input type="long" name="conId" value="flowScope.conId"/>

  <!-- my first view state -->
  <view-state id="register" model="register">
  <!-- imagine much more stuff here -->
</flow>

当输入带有附加 conId (http://localhost:8080/app/myflow?conId=123) 的流时,会弹出以下错误:

2012-08-07 17:33:34,583 WARN 25205715@qtp-28882952-5 com.coremedia.cae.webflow.AbstractFlowViewController - Error handling flow request: 'Could not serialize flow execution; make sure all objects stored in flow or flash scope are serializable': /app/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

我很惊讶,提供的值似乎不是可序列化的,因为它是一个简单的 int 值。看起来我在这里缺少一些基本的东西。

【问题讨论】:

    标签: java spring web-applications spring-webflow-2


    【解决方案1】:

    确保 org.zcore.conference.Registration 是可序列化的 如果是,那么它可能是您的视图状态中另一个不是的对象

    【讨论】:

    • 基本正确。不幸的是,所有其他对象都实现了 Serializable。
    • 不幸的是还没有。我试图从头开始重写整个事情。我的(肮脏的)临时修复现在没有使用 webflows。
    猜你喜欢
    • 1970-01-01
    • 2013-02-22
    • 1970-01-01
    • 2020-06-14
    • 1970-01-01
    • 2016-04-25
    • 1970-01-01
    • 2019-01-01
    • 1970-01-01
    相关资源
    最近更新 更多