This is applicable to all versions of VMware GemFire.
After configuring PDX, accessing the PDX entries works only once. Subsequent calls fail with the error: "Failed to create PDX instance from json".
The stack trace shows the following:
Caused by: org.apache.geode.cache.CacheClosedException: Client pools have been closed so the PDX type registry is not available.
The CacheClosedException indicates that the caching system has been closed. This exception can be thrown from almost any method related to regions or the cache after the cache has been closed.
Here are some recommendations to resolve this issue:
ClientCacheFactory cf = new ClientCacheFactory(); cf.addPoolServer(host, port); // Server end point ClientCache cache = getClientCache(cf); cache.getDefaultPool(); // Initialize the pool