|Pivotal GemFire||7.0.2 or later|
This article provides a resolution for the case when a client received an error when connecting to a cluster where PdxType information has changed.
When using PDX serialization, you can save the PdxType information on the client by setting a PDX disk store in the pdx tag:
read-serialized="true" persistent="true" disk-store-name="pdxDiskStore"
When the client connects to the servers, it will retrieve PDX type information from the servers and update the local PDX disk store.
If the disk stores on the servers are removed, for instance, to clean-up before loading data, and the client already has PDX type information from the previous setup, an error will be thrown that the client is holding stale PDX type information.
Instead of removing the PDX disk store manually on the client, set the following hidden GemFire property to clean the PDX disk store on the client when it is disconnected from the cluster:
This can be done setting the property in the client start-up script:
Note that, before GemFire 8.2.0, there was an issue using this property:
#51351 Deserialization errors Using the gemfire.ON_DISCONNECT_CLEAR_PDXTYPEIDS system property with the autoserializer can result in deserialization errors because that autoserializer is not cleared when all servers are disconnected