Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
I have a distributed system with a locator and 3 servers. I then start a client executing an onServers function forever.
The client is doing this in a loop:
FunctionService.onServers(this.cache).execute("TestFunction").getResult();
If I stop the distributed system using gfsh like:
gfsh shutdown --include-locators=true
The client throws a NullPointerException like:
org.apache.geode.cache.execute.FunctionException: java.lang.NullPointerException at org.apache.geode.internal.cache.execute.ServerFunctionExecutor.executeOnServer(ServerFunctionExecutor.java:234) at org.apache.geode.internal.cache.execute.ServerFunctionExecutor.executeFunction(ServerFunctionExecutor.java:104) at org.apache.geode.internal.cache.execute.ServerFunctionExecutor.execute(ServerFunctionExecutor.java:368) at org.apache.geode.internal.cache.execute.ServerFunctionExecutor.execute(ServerFunctionExecutor.java:377) at TestClient.executeFunction(TestClient.java:23) at TestClient.executeFunctionForever(TestClient.java:34) at TestClient.main(TestClient.java:15) Caused by: java.lang.NullPointerException at org.apache.geode.cache.client.internal.ExecuteFunctionOp.constructAndGetFunctionTasks(ExecuteFunctionOp.java:131) at org.apache.geode.cache.client.internal.ExecuteFunctionOp.execute(ExecuteFunctionOp.java:79) at org.apache.geode.internal.cache.execute.ServerFunctionExecutor.executeOnServer(ServerFunctionExecutor.java:217)
The NPNullPointerExceptionE is in ExecuteFunctionOp.constructAndGetFunctionTasks here:
List<ServerLocation> servers = pool.getConnectionSource().getAllServers();
In this case, servers is null.
Attachments
Issue Links
- is duplicated by
-
GEODE-7043 Session cache throws NPE during startup if no servers are available
- Resolved
- links to