PdxType ClassNotFoundException after upgrading from GemFire 8.2.x to 9
search cancel

PdxType ClassNotFoundException after upgrading from GemFire 8.2.x to 9

book

Article ID: 294116

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

Symptoms:

Here is the error statement

[severe 2018/11/20 14:47:50.151 UTC gemfire-data-node-cer-lx-nfireq01-49002 <Recovery thread for bucket _B__tradeInstruction_48> tid=0x120] Error calculating expiration A ClassNotFoundException was thrown while trying to deserialize cached value.

org.apache.geode.SerializationException: A ClassNotFoundException was thrown while trying to deserialize cached value.

at org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1989)

at org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1972)

at org.apache.geode.internal.cache.VMCachedDeserializable.getDeserializedValue(VMCachedDeserializable.java:132)

at org.apache.geode.internal.cache.LocalRegion.getDeserialized(LocalRegion.java:1315)

at org.apache.geode.internal.cache.LocalRegion.getDeserializedValue(LocalRegion.java:1254)

at org.apache.geode.internal.cache.LocalRegionDataView.getDeserializedValue(LocalRegionDataView.java:43)

at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1406)

at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1356)

at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1341)

at org.apache.geode.internal.cache.AbstractRegion.get(AbstractRegion.java:408)

at org.apache.geode.pdx.internal.PeerTypeRegistration.getById(PeerTypeRegistration.java:425)

at org.apache.geode.pdx.internal.PeerTypeRegistration.getType(PeerTypeRegistration.java:418)

at org.apache.geode.pdx.internal.TypeRegistry.getType(TypeRegistry.java:134)

at org.apache.geode.internal.InternalDataSerializer.readPdxSerializable(InternalDataSerializer.java:3250)

at org.apache.geode.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:3065)

at org.apache.geode.DataSerializer.readObject(DataSerializer.java:2978)

at org.apache.geode.internal.util.BlobHelper.deserializeBlob(BlobHelper.java:90)

at org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1979)

at org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1972)

at org.apache.geode.internal.cache.VMCachedDeserializable.getDeserializedValue(VMCachedDeserializable.java:110)

at org.apache.geode.internal.cache.LocalRegion.getDeserialized(LocalRegion.java:1315)

at org.apache.geode.internal.cache.LocalRegion$ExpiryRegionEntry.getValue(LocalRegion.java:7941)

at com.newedge.datafabric.event.expiry.NvisionCacheExpiry.getExpiry(NvisionCacheExpiry.java:48)

at com.newedge.gemfire.support.CustomExpiryDelegator.getExpiry(CustomExpiryDelegator.java:31)

at org.apache.geode.internal.cache.LocalRegion.createExpiryTask(LocalRegion.java:8019)

at org.apache.geode.internal.cache.LocalRegion.addExpiryTask(LocalRegion.java:8154)

at org.apache.geode.internal.cache.LocalRegion.addExpiryTask(LocalRegion.java:7862)

at org.apache.geode.internal.cache.LocalRegion.lambda$rescheduleEntryExpiryTasks$0(LocalRegion.java:7850)

at org.apache.geode.internal.cache.ExpiryTask.doWithNowSet(ExpiryTask.java:492)

at org.apache.geode.internal.cache.LocalRegion.rescheduleEntryExpiryTasks(LocalRegion.java:7848)

at org.apache.geode.internal.cache.LocalRegion.initialize(LocalRegion.java:2396)

at org.apache.geode.internal.cache.DistributedRegion.initialize(DistributedRegion.java:1098)

at org.apache.geode.internal.cache.BucketRegion.initialize(BucketRegion.java:260)

at org.apache.geode.internal.cache.LocalRegion.createSubregion(LocalRegion.java:1015)

at org.apache.geode.internal.cache.PartitionedRegionDataStore.createBucketRegion(PartitionedRegionDataStore.java:779)

at org.apache.geode.internal.cache.PartitionedRegionDataStore.grabFreeBucket(PartitionedRegionDataStore.java:454)

at org.apache.geode.internal.cache.PartitionedRegionDataStore.grabFreeBucketRecursively(PartitionedRegionDataStore.java:313)

at org.apache.geode.internal.cache.PartitionedRegionDataStore.grabBucket(PartitionedRegionDataStore.java:2918)

at org.apache.geode.internal.cache.ProxyBucketRegion.recoverFromDisk(ProxyBucketRegion.java:424)

at org.apache.geode.internal.cache.ProxyBucketRegion.recoverFromDiskRecursively(ProxyBucketRegion.java:390)

at org.apache.geode.internal.cache.PRHARedundancyProvider$4.run2(PRHARedundancyProvider.java:1756)

at org.apache.geode.internal.cache.partitioned.RecoveryRunnable.run(RecoveryRunnable.java:58)

at org.apache.geode.internal.cache.PRHARedundancyProvider$4.run(PRHARedundancyProvider.java:1748)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.ClassNotFoundException: com.gemstone.gemfire.pdx.internal.PdxType

at org.apache.geode.internal.ClassPathLoader.forName(ClassPathLoader.java:170)

at org.apache.geode.internal.InternalDataSerializer.getCachedClass(InternalDataSerializer.java:3921)

at org.apache.geode.DataSerializer.readClass(DataSerializer.java:265)

at org.apache.geode.internal.InternalDataSerializer.readDataSerializable(InternalDataSerializer.java:2540)

at org.apache.geode.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:3017)

at org.apache.geode.DataSerializer.readObject(DataSerializer.java:2978)

at org.apache.geode.internal.util.BlobHelper.deserializeBlob(BlobHelper.java:99)

at org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1979)

... 43 more


Note the ClassNotFoundException:
Caused by: java.lang.ClassNotFoundException: com.gemstone.gemfire.pdx.internal.PdxType

This same error can also be thrown when importing data that was exported from GemFire 8.2.2 or later 8 version.

Environment


Cause

Whether seeing the exception after upgrading or when importing data that was exported from GemFire 8.2.2 or later 8 version, this issue is caused by not having the geode-old-client-support-9.x.x.jar on the class path. This Jar file contains the classes that are needed for upgrading the internal GemFire classes and packages from the previous com.gemstone.gemfire in version 8.2.x to the new com.geode in GemFire 9.

Resolution

Make sure that geode-old-client-support-9.x.x.jar is available on the server and that the jar is added to the class path of GemFire. You can find the class path used by GemFire in the log file configuration header to check.