You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Jianxia Chen (Jira)" <ji...@apache.org> on 2020/02/06 18:40:00 UTC

[jira] [Assigned] (GEODE-7746) An onServers function throws a NullPointerException if the distributed system is shutdown

     [ https://issues.apache.org/jira/browse/GEODE-7746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jianxia Chen reassigned GEODE-7746:
-----------------------------------

    Assignee: Jianxia Chen

> An onServers function throws a NullPointerException if the distributed system is shutdown
> -----------------------------------------------------------------------------------------
>
>                 Key: GEODE-7746
>                 URL: https://issues.apache.org/jira/browse/GEODE-7746
>             Project: Geode
>          Issue Type: Bug
>          Components: functions
>            Reporter: Barrett Oglesby
>            Assignee: Jianxia Chen
>            Priority: Major
>              Labels: GeodeCommons
>
> 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:
> {noformat}
> FunctionService.onServers(this.cache).execute("TestFunction").getResult();
> {noformat}
> If I stop the distributed system using gfsh like:
> {noformat}
> gfsh shutdown --include-locators=true
> {noformat}
> The client throws a NullPointerException like:
> {noformat}
> 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)
> {noformat}
> The NPNullPointerExceptionE is in ExecuteFunctionOp.constructAndGetFunctionTasks here:
> {noformat}
> List<ServerLocation> servers = pool.getConnectionSource().getAllServers();
> {noformat}
> In this case, servers is null.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)