Failed To Register Instantiators for Classes Derived from GemFire HTTP Session Management Modules
search cancel

Failed To Register Instantiators for Classes Derived from GemFire HTTP Session Management Modules

book

Article ID: 294165

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

Symptoms:

This article provides a workaround in case the GemFire HTTP session management modules for AppServer don't work properly as a result of failing register instantiators for related classes which are required to de/serialize instances of those classes.

In the case of complex configuration (especially, applying GemFire HTTP session management modules based on client-server configuration on GemFire clusters across WAN Gateways), GemFire HTTP session management modules sometimes can't work properly because of failing to register instantiators for related classes. In this case, you may see the following kinds of messages in the logs.

Client Side Log Message:

No Instantiator has been registered for class with id  27,315

Server Side Log Message:

Instantiator registered with id 27,315 class com.gemstone.gemfire.modules.session.filter.GemfireHttpSession
 :
Error registering instantiator on pool: ...(any reasons)

Environment


Cause

Currently, GemFire HTTP session management modules for AppServer triggers to register instantiators for related classes remotely from the client side. If failing to trigger the task remotely because of network issues or something similar, this issue could happen.

Resolution

If you continuously see this issue even if there are no network issues, follow the steps to configure to register instantiators for related classes locally:

  1. Register instantiators for related classes at all the GemFire clients: According to log message, you can register instantiators for the target classes locally by calling Class.forName at client side application like the following:
    Class.forName(GemfireHttpSession.class.getName());
    Class.forName(DeltaSessionAttributes.class.getName());
    Class.forName(DeltaQueuedSessionAttributes.class.getName());
     :
  2. Register instantiators for related classes at all the GemFire cache servers: According to log message, you can register instantiators for the target classes locally by setting each class names and their IDs at cache.xml like the following:
    <serialization-registration>
     <instantiator id="27315">
     <class-name>com.gemstone.gemfire.modules.session.filter.GemfireHttpSession</class-name>
     </instantiator>
     <instantiator id="347">
     <class-name>com.gemstone.gemfire.modules.session.filter.attributes.DeltaSessionAttributes</class-name>
     </instantiator>
     <instantiator id="3479">
     <class-name>com.gemstone.gemfire.modules.session.filter.attributes.DeltaQueuedSessionAttributes</class-name>
     </instantiator>
     :
    </serialization-registration>