Mule 4:对象存储:无法反序列化对象



场景:在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项目运行,并对其进行了测试。它运行良好。当我在另一个mule4项目中将该应用程序作为maven依赖项使用时,注意到了这个问题。

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

错误发生在打包mule应用程序时。我使用了mule-maven插件3.3.5,并提供了以下配置:

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

它工作

最新更新