Loading

Mule 4 Caching scope "Could not serialize object"

게시 일자: May 21, 2025
상세 설명

When you enable persistent option in the object store configuration in caching strategy module and see the following error in the logs (issue exist in java 8 and 17):

 

2025-04-29 09:56:15.113 ERROR org.mule.runtime.core.privileged.exception.DefaultExceptionListener [[MuleRuntime].uber.30: [app-v2-dev].azure-cache-store_[cachingStrategy] @59eedb0]: event:20621b20-24e0-11f0-9e6f-06a903a25927 ******************************************************************************** Message : Could not serialize object Element : crm-token-flow/processors/2/route/1/processors/2 @ app-v2-dev:common/crm-token-flow.xml:42 (Cache) Element DSL : <ee:cache doc:name="Cache" doc:id="9ebc1423-a553-4c34-92d2-2fc376c078df" cachingStrategy-ref="azure-cache-store"> <bekaert-elog-connector:custom-log doc:name="INFO : Before Get Secret" doc:id="0c81f4be-ef25-49a1-9611-7d972ae9c3e2" category="create-rpa-simulation.customlog">
 


Root Exception stack trace: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:237) at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:1555) at com.microsoft.sqlserver.jdbc.SQLServerStatement.checkClosed(SQLServerStatement.java:1101) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:479) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1022) at org.mule.db.commons.shaded.internal.result.resultset.ResultSetIterator.hasNext(ResultSetIterator.java:48) at org.mule.db.commons.shaded.internal.operation.DmlOperations$1.getPage(DmlOperations.java:153) at org.mule.db.commons.shaded.internal.operation.DmlOperations$1.getPage(DmlOperations.java:141)

솔루션

In such cases you can try 2 options :

1. Transform Message Step: Add a transformation step to consume the full payload instead of a partial payload. This ensures the connector properly returns the connection to the pool after processing.

2. Use non-repeatable-stream in the listener: If the payload is not being consumed multiple times, switching to non-repeatable-stream (under Advanced section of the listener). This can help return connections back to the pool more efficiently.

Knowledge 기사 번호

004867709

 
로드 중
Salesforce Help | Article