Geode spring boot Cache Client Updater Thread crash

178 Views Asked by At

Using

implementation 'org.springframework.geode:spring-geode-starter:1.2.8.RELEASE'    
implementation 'org.springframework.data:spring-data-geode:2.2.8.RELEASE'

I setup a listener

@Service
public class LQuote extends CacheListenerAdapter {
...afterCreate...
...afterUpdate...
}

When an event comes to the local cache from the server the Cache Client Updater Thread reads the event using readPdxSerializable pdxType but when it is trying to load the domain object class it hits an endpoint Crashed issue:

TRACE [Cache Client Updater Thread  on 1.2.3.4(ServerUAT:6392)<v1>:41001(version:UNKNOWN[ordinal=105]) port 40404] org.apache.geode.internal.ClassPathLoader 156 forName: forName trying: java.net.URLClassLoader@3b8b4846
DEBUG [Cache Client Updater Thread  on 1.2.3.4(ServerUAT:6392)<v1>:41001(version:UNKNOWN[ordinal=105]) port 40404] org.apache.geode.cache.client.internal.InstantiatorRecoveryListener 63 endpointCrashed: InstantiatorRecoveryTask - EndpointCrashed. Now have 0 endpoints
DEBUG [Cache Client Updater Thread  on 1.2.3.4(ServerUAT:6392)<v1>:41001(version:UNKNOWN[ordinal=105]) port 40404] org.apache.geode.cache.client.internal.DataSerializerRecoveryListener 51 endpointCrashed: DataSerializerRecoveryTask - EndpointCrashed. Now have 0 endpoints
INFO  [Cache Client Updater Thread  on 1.2.3.4(ServerUAT:6392)<v1>:41001(version:UNKNOWN[ordinal=105]) port 40404] org.apache.geode.cache.client.internal.QueueManagerImpl 372 endpointCrashed: Primary subscription endpoint 1.2.3.4:40404 crashed. Scheduling recovery.

I guess this could be because the domain object class does not override ToData and FromData or FromPdx and ToPdx according to Implementing PdxSerializable but adding these, or adding

@Region
public class Quote implements DataSerializable {

with toData and fromData has no effect. The issue remains.

1

There are 1 best solutions below

0
On

The way to resolve this was, like, to specify domain objects for all the objects that I want to use.

class myObject1 implements PdxSerializable {

...

public void toData(PdxWriter writer)
{
    writer.writeString("MsgType", MsgType);
    ...
}

public void fromData(PdxReader reader)
{
    MsgType = reader.readString("MsgType");
    ....
}