异常发现更新的轮询水印:变量不可序列化

Exception found updated poll watermark: Variable is not serializable

我在 Mule Poll/Watermark 中遇到以下异常:

Exception found updating watermark java.lang.IllegalArgumentException: Value retrieved from event for variable carimboTempo is not serializable and hence cant be saved to the object store

部分XML配置:

<db:mysql-config name="MySQL_Configuration" host="${crm.db.host}" port="${crm.db.port}" user="${crm.db.user}" password="${crm.db.password}" database="${crm.db.instance}" doc:name="MySQL Configuration"/>
<flow name="levius-contatoFlow" processingStrategy="synchronous">
    <poll doc:name="Poll">
        <fixed-frequency-scheduler frequency="10000"/>
        <watermark variable="carimboTempo" default-expression="2016-03-24 00:00:00" update-expression="#[flowVars.date_modified]"/>
        <db:select config-ref="MySQL_Configuration" doc:name="Database">
            <db:parameterized-query><![CDATA[select 
ac.id,
c.first_name,
c.last_name,
greatest(ac.date_modified, c.date_modified) date_modified
from accounts_contacts ac
join contacts c on c.id = ac.contact_id
where greatest(ac.date_modified, c.date_modified) > #[carimboTempo]
order by greatest(ac.date_modified, c.date_modified)]]></db:parameterized-query>
        </db:select>
    </poll>
    <foreach doc:name="For Each">
        <set-variable variableName="date_modified" value="#[payload.date_modified]" doc:name="Variable"/>
    </foreach>
</flow>

为什么会出现这个异常?我做错了什么吗?

我有同样的错误。你能试试这个吗:

[sessionVars.lastUpdated == null?lastModified:sessionVars.lastUpdated]

我认为,流程正在尝试序列化空值。