After making backups for the persistent data from members to a specified directory, you might need to use the
gfsh command to validate whether online persistence diskstores or to backup offline diskstores that have any disk corruptions.
If there are custom objects or classes associated with the regions in the disk stores, as the following example shows, you may encounter a
ClassNotFoundException when validating the offline disk store with
gfsh.
The problem is that custom classes/packages are not included in the classpath, and the '
--J' option or '
--classpath' do not work as parameters for the
'gfsh validate offline-disk-store' script.
Cluster-1 gfsh>validate offline-disk-store --name=data-disk-store --disk-dirs=/path/to/disk-store/dir
Validating data-disk-store
/app-product-details: entryCount=0
/app-network: entryCount=0
/app-code-master: entryCount=0
/app-search-index entryCount=0 bucketCount=7
/app-cot entryCount=0 bucketCount=3
/app-source-pid-xref entryCount=0 bucketCount=7
/app-ext-system-entity-xref entryCount=0 bucketCount=7
/app-membership entryCount=0 bucketCount=7
/app-indicator entryCount=0 bucketCount=7
/app-genkey-xref entryCount=0 bucketCount=7
/app-person entryCount=0 bucketCount=7
/app-coverage-ancillary entryCount=0 bucketCount=8
/app-person-pid-xref entryCount=0 bucketCount=7
/app-person-attributes entryCount=0 bucketCount=7
Error in validating disk store data-disk-store is : A ClassNotFoundException was thrown while trying to deserialize cached value.
The question is then, how do we add classpath to avoid the above mentioned
ClassNotFoundException, so that we are able to verify using
gfsh?
This article shows you how to add classpath when validating offline diskstore using gfsh.