Mule 4:Objectstore:无法反序列化对象

Mule 4 : Objectstore : Could not deserialize object

场景:在 Mule 4 应用程序中,我们使用 Maven 依赖项 MAVEN_DEPENDENCY_APP。 MAVEN_DEPENDENCY_APP 也是一个包含对象存储的 Mule 4 应用程序。当 运行 主应用程序时,出现以下错误:

Caused by: org.mule.runtime.api.exception.MuleRuntimeException: org.mule.runtime.deployment.model.api.DeploymentStartException: Error starting application 'testproject'
Caused by: org.mule.runtime.deployment.model.api.DeploymentStartException: Error starting application 'testproject'
Caused by: org.mule.runtime.api.lifecycle.LifecycleException: Found error when trying to access ObjectStore
Caused by: org.mule.runtime.api.exception.DefaultMuleException: Found error when trying to access ObjectStore
Caused by: org.mule.runtime.extension.api.exception.ModuleException: Found error when trying to access ObjectStore
Caused by: org.mule.runtime.api.store.ObjectStoreException: Could not deserialize object
Caused by: org.mule.runtime.api.serialization.SerializationException: Could not deserialize object
Caused by: org.mule.runtime.api.serialization.SerializationException: Cannot deserialize object

我们试图保存在 MAVEN_DEPENDENCY_APP 的对象库中的对象如下:


<ee:transform doc:name="Add id to incoming message" doc:id="32e58163-a06a-414b-84a9-c06768e7733c" >
            <ee:message >
                <ee:set-payload ><![CDATA[%dw 2.0
output application/java
---
{
    "message-id" : uuid() as String,
    "errorPayload" : write(message.payload,"application/java")
}]]></ee:set-payload>
            </ee:message>
        </ee:transform>

注意:我尝试将 运行 和 MAVEN_DEPENDENCY_APP 作为 mule 项目并对其进行了测试。它工作正常。 当我在另一个 mule 4 项目中将该应用程序用作 maven 依赖项时,发现了问题。

尝试更新 objectStore 连接器版本和运行时版本。我过去 运行 遇到过类似的问题,我相信已经解决了。

打包 mule 应用程序时出错。我使用了 mule-maven-plugin 3.3.5 并提供了以下配置:

<configuration>
                    <classifier>mule-plugin</classifier>
                </configuration>

有效