Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B5049200B6F for ; Wed, 24 Aug 2016 20:10:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B3903160AB1; Wed, 24 Aug 2016 18:10:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D481F160A91 for ; Wed, 24 Aug 2016 20:10:35 +0200 (CEST) Received: (qmail 9483 invoked by uid 500); 24 Aug 2016 18:10:35 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 9472 invoked by uid 99); 24 Aug 2016 18:10:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Aug 2016 18:10:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 88EA41A001F for ; Wed, 24 Aug 2016 18:10:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.21 X-Spam-Level: * X-Spam-Status: No, score=1.21 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=2, HTML_OBFUSCATE_05_10=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id iGF51Y1npLx0 for ; Wed, 24 Aug 2016 18:10:32 +0000 (UTC) Received: from mail-ua0-f171.google.com (mail-ua0-f171.google.com [209.85.217.171]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id C37275FBD6 for ; Wed, 24 Aug 2016 18:10:31 +0000 (UTC) Received: by mail-ua0-f171.google.com with SMTP id m60so2536531uam.3 for ; Wed, 24 Aug 2016 11:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=W8G7M8/h0hsN/1NSxu/cT5fvnsXga1QTCyD3D38q40Y=; b=Bz0JKx5qevIYyYVlVRXzC+gRBgKIkua8oCV37OZ1vZZo1de8gtZB1rxhgLvxtcUGUo ejk/HBJXWFBYUAmCi80C1zagWt3s0EOJ6IFoKt6hGzg/Izwwk06CWJAGtqZ2PaqKWeNF 9aHO7Ut7v3lqnycy6Cr7Cn2fxQrHWCd6i4xDqAVERuZxbeiP5mk1EbK668ggXSGxYWS0 aTPT5F0rElK6ytFAEYivyAXSqEdydZMPjDQJTDCtB1+Po6CldgABd6H46xaQ8s/ZQiaK eIesHew3Az9t4zj2zeyXYZo9mKZhdi/yctdJqAb7tGvhRX31oK/f3wzVAYgY9Xm3GcUQ Dt7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=W8G7M8/h0hsN/1NSxu/cT5fvnsXga1QTCyD3D38q40Y=; b=WfGZ2+Plj9r1KSx1eDAYpIKjEFkPCVcnRX7RfIwCOkDXHft+JtsoxQ/pu+0NY/joZC 5eQiy/d/xtFPpwVvd/rIrwl+Ayv4/COdfIgpfnaL9uH/XzEeiiMXHbgAVdsReSyFXxUz r/gdMsoq/nSy9qkQ5F2jJswmfRGvLDdQjBRw73+cpzO8dPJ3n3tS2Dff8/wgpudf7EnD 3e+MM9uf52mL+bonMycdQPZDj1R7/QsdaIALGfyXTfJO51KdfhH6rJdlILR17Yj6YRdQ BiFU9JQphTK0OAxDrBpmaplwARAhkJzi3nybQUnXGJmWZKmEg5c6dR0SGJZE9buWPY0l FPJQ== X-Gm-Message-State: AEkoouuEvlIzxNX8yBZtcqiIcncoFinO/DIr1X2vS9v3YU3A4/G0TLRziHvIdfgToPxJJ4YzeigQ3c4xJZDgMA== X-Received: by 10.31.99.67 with SMTP id x64mr2521763vkb.76.1472062230612; Wed, 24 Aug 2016 11:10:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.34.76 with HTTP; Wed, 24 Aug 2016 11:10:30 -0700 (PDT) In-Reply-To: References: <2016082416045081469142@neusoft.com> From: Alexey Goncharuk Date: Wed, 24 Aug 2016 21:10:30 +0300 Message-ID: Subject: Re: null exception about EntryProcessor To: user@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c07b11857d0bc053ad53296 archived-at: Wed, 24 Aug 2016 18:10:36 -0000 --94eb2c07b11857d0bc053ad53296 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, You need to make your EntryProcessor a static class, otherwise it captures a reference to your enclosing class which causes the serialization exception. 2016-08-24 17:54 GMT+03:00 Vladislav Pyatkov : > Hello, > > Could you please provide reproduced example? > > On Wed, Aug 24, 2016 at 11:04 AM, =E8=83=A1=E6=B0=B8=E4=BA=AE/Bob wrote: > >> hi, everyone: >> >> When I use EntryProcessor to update value in remote node, the >> statement entry.getValue() throwed null exception. The log detail is in >> the attachement file log.txt. >> I don't know why. >> >> I first do a check with the statement cache.containsKey(key), if it >> is true, then do the EntryProcessor. Why null exception happened? >> >> if (cache.containsKey(key)) { >> // Map map =3D cache.get(key); >> // map.put(mapLink.seclinkID.linkID + "_" >> + mapLink.seclinkID.dir, mapLink); >> // cache.put(key, map); >> line 122 cache.invoke(key, new EntryPr >> ocessor, Void>() { >> @Override >> public Void process(MutableEntry< >> MapMeshLinkKey,Map> entry, Object... args) { >> line 125 Map map =3D ent >> ry.getValue(); >> map.put(mapLink.seclinkID.linkID >> + "_" + mapLink.seclinkID.dir, mapLink); >> entry.setValue(map); >> return null; >> } >> }); >> ENTRY_COUNT++; >> } >> >> Can anyone help me, or meet this problem? Thanks your reply. >> >> ------------------------------ >> =E8=83=A1=E6=B0=B8=E4=BA=AE >> >> >> >> ------------------------------------------------------------ >> --------------------------------------- >> Confidentiality Notice: The information contained in this e-mail and any >> accompanying attachment(s) >> is intended only for the use of the intended recipient and may be >> confidential and/or privileged of >> Neusoft Corporation, its subsidiaries and/or its affiliates. If any >> reader of this communication is >> not the intended recipient, unauthorized use, forwarding, printing, >> storing, disclosure or copying >> is strictly prohibited, and may be unlawful.If you have received this >> communication in error,please >> immediately notify the sender by return e-mail, and delete the original >> message and all copies from >> your system. Thank you. >> ------------------------------------------------------------ >> --------------------------------------- >> > > > > -- > Vladislav Pyatkov > --94eb2c07b11857d0bc053ad53296 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

You need to make your EntryProcesso= r a static class, otherwise it captures a reference to your enclosing class= which causes the serialization exception.

2016-08-24 17:54 GMT+03:00 Vladislav P= yatkov <vldpyatkov@gmail.com>:
Hello,

Could you please p= rovide reproduced example?

On Wed, Aug 24, 2016 at 11:04 AM,= =E8=83=A1=E6=B0=B8=E4=BA=AE/Bob <hu-yl@neusoft.com> wrote:<= br>
hi, ev= eryone:
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 When I use=C2=A0= EntryProcessor to update value in remote node, the statement=C2=A0entr= y.getValue() throwed null exception. The log detail is in the attachement f= ile log.txt.
=C2=A0 =C2=A0 I don't know why.

=C2=A0 =C2=A0 I first do a check with the statement=C2=A0cache.co= ntainsKey(key), if it is true, then do the=C2=A0EntryProcessor. W= hy null exception happened?
=C2=A0 =C2=A0=C2=A0
if= =C2=A0(cache.containsKey(key))=C2=A0{
//=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0Map<String,=C2=A0maplink>=C2=A0map=C2=A0=3D=C2=A0= cache.get(key);
//=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0map= .put(mapLink.seclinkID.linkID=C2=A0+=C2=A0"_"=C2=A0+=C2= =A0mapLink.seclinkID.dir,=C2=A0mapLink);
//=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0cache.put(key,=C2=A0map);
line 122 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cache.invoke(key= ,=C2=A0new=C2=A0EntryProcessor<MapMeshLinkKey,Map<String,ma= plink>,=C2=A0Void>()=C2=A0{
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0@Override=C2=A0
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0public=C2=A0Void=C2= =A0process(MutableEntry<MapMeshLinkKey,Map<String,maplink&g= t;>=C2=A0entry,=C2=A0Object...=C2=A0args)=C2=A0{
line 125 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0Map<String,maplink>=C2=A0map=C2=A0=3D=C2=A0entr= y.getValue();
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0map.put(mapLink.seclinkID.linkID=C2=A0+=C2=A0"_"=C2=A0+=C2=A0mapLink.seclinkID.dir,=C2=A0= mapLink);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0entry.setValue(map);
=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0return=C2=A0null;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0}
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0});
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0ENTRY_COUNT++= ;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0}

Can anyone help me, or meet t= his problem? Thanks your reply.


=E8=83=A1=E6= =B0=B8=E4=BA=AE
=C2=A0


--------------------------------------------------------------= -------------------------------------
Confidentiality Notice: The i= nformation contained in this e-mail and any accompanying attachment(s)
= is intended only for the use of the intended recipient and may be confident= ial and/or privileged of
Neusoft Corporation, its subsidiaries and/or i= ts affiliates. If any reader of this communication is
not the intended = recipient, unauthorized use, forwarding, printing,=C2=A0 storing, disclosur= e or copying
is strictly prohibited, and may be unlawful.If you have re= ceived this communication in error,please
immediately notify the sender= by return e-mail, and delete the original message and all copies from
= your system. Thank you.
------------------------------------------= ---------------------------------------------------------




--
Vladislav Pyatkov

--94eb2c07b11857d0bc053ad53296--