Re: [jgroups-users] In which case Rsp could be null?

Questions/problems related to using JGroups <[email protected]>
Newsgroups gmane.comp.java.javagroups.general,gmane.spam.detected
Message-ID <[email protected]>
Which version?
In 4.0, callRemoteMethods() can actually return *null*. Do you have some 
code that reproduces this?

On 06/04/16 5:32 PM, Questions/problems related to using JGroups wrote:
> Hello,
>
> I use RPC, and getting NullPointerException in very unusual place:
>
> Here is my code example:
>
> -----------------
>
> RspList<Boolean> result = dispatcher.callRemoteMethods(null,
> "fileExists", new Object[] { localFileName }, newClass[] {
> String.class}, OPT_ALL_IN_5_SEC);
>
> for (Rsp<Boolean> rsp : result.values()) {
>
> if (rsp.getValue()) {
>
> -------------------
>
> the last line sometimes throws NPE. Looks like rsp is null.
>
> The fileExists method returns primitive boolean, so the result cannot be
> null by definition.
>
> Looks like something went wrong during the cluster communication.
>
> What could it be?
>
>
> Thanks,
>
> Eugene
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> javagroups-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javagroups-users
>

-- 
Bela Ban, JGroups lead (http://www.jgroups.org)


------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.