Form Data Model Get service fails with “InvalidClassException” in Adobe Experience Manager Forms 6.6 LTS

This article explains how to troubleshoot the org.apache.commons.lang3.SerializationException: InvalidClassException while reading cloned object data error when executing the Get service operation in a Form Data Model in AEM Forms 6.6 LTS. To fix this, review recent changes to the data model schema and related Java classes, align the class versions used for serialization and deserialization, recompile and redeploy the affected components, and execute the service again.

Description description

Environment

  • Adobe Experience Manager Forms 6.6 LTS
  • Form Data Model with a Get service operation

Issue/Symptoms

  • Executing the Get service operation in a data model produces the error org.apache.commons.lang3.SerializationException: InvalidClassException while reading cloned object data.
  • The error appears in the logs while the service is executed from the Services tab in the data model.

Cause

A class version mismatch or incompatibility occurs during object serialization or deserialization. The mismatch occurs when a class definition changes after an object is serialized or when different versions of the class are present during serialization and deserialization.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Review recent changes to the data model schema and related Java classes involved in the serialization process.
  2. Verify that all classes used in the data model are compatible and that their definitions match the definitions used when the object was serialized.
  3. Verify that the same version of each class is present on both the serialization and deserialization sides. Check updates and deployments that modified the class definitions.
  4. If changes were made to the data model schema or Java classes, recompile and redeploy the affected components to ensure consistency.
  5. If additional troubleshooting is required, enable detailed logging for the affected components and capture more context around the error.
  6. After making the necessary corrections, execute the Get service operation again and verify that the error no longer occurs.
recommendation-more-help
experience-cloud-kcs-help-kbarticles