ClassNotFoundException for BootstrappingFunction class is thrown if adding locators
search cancel

ClassNotFoundException for BootstrappingFunction class is thrown if adding locators

book

Article ID: 294289

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

Symptoms:

If trying to add locators to an existing GemFire distributed system with HTTP Session Management Modules configured, you may see the following exception in the locator's logs although those locators start and run fine:

Error Message:

[severe 2017/07/11 11:40:06.760 JST locator2 <P2P message reader for host2(server2:5480)<v2>:34327 shared unordered uid=9 port=57313>
tid=0x33] Error deserializing message
java.lang.ClassNotFoundException: com.gemstone.gemfire.modules.util.BootstrappingFunction
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:626)
at com.gemstone.gemfire.internal.InternalDataSerializer$DSObjectInputStream.resolveClass(InternalDataSerializer.java:3626)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1613)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
at com.gemstone.gemfire.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:2972)
at com.gemstone.gemfire.DataSerializer.readObject(DataSerializer.java:3212)
at com.gemstone.gemfire.internal.cache.MemberFunctionStreamingMessage.fromData(MemberFunctionStreamingMessage.java:272)
at com.gemstone.gemfire.internal.InternalDataSerializer.invokeFromData(InternalDataSerializer.java:2485)
at com.gemstone.gemfire.internal.DSFIDFactory.create(DSFIDFactory.java:1080)
at com.gemstone.gemfire.internal.InternalDataSerializer.readDSFID(InternalDataSerializer.java:2696)
at com.gemstone.gemfire.internal.tcp.Connection.processNIOBuffer(Connection.java:3531)
at com.gemstone.gemfire.internal.tcp.Connection.runNioReader(Connection.java:1851)
at com.gemstone.gemfire.internal.tcp.Connection.run(Connection.java:1721)
at java.lang.Thread.run(Thread.java:745)

 

Environment


Cause

Once the HTTP Session Management Module is configured in the distributed system by starting a first (non-locator) member, the BootstrappingFunction is executed on any additional members in the distributed system for the purpose of initialization. This is executed not only for additional members but also for additional locators. Hence, if have not added a path for the BootstrappingFunction class (included in the jar file for the HTTP Session Management Modules) into the CLASSPATH of additional locators, you will see a ClassNotFoundException in those locators' logs.

Resolution

The BootstrappingFunction does not need to be executed for locators, so you can ignore this ClassNotFoundException. If, however, you would like to eliminate the exception message, simply add the path for the HTTP Session Management Modules jar file into the CLASSPATH. (If you start your locator using the gfsh "start locator" command, you can add those jars to the CLASSPATH via the "--classpath" parameter.