Re: [jgroups-dev] What does cause NullPointerException?
Development issues <[email protected]> Wed, 23 Dec 2015 11:30:13 -0700 (MST)
| Newsgroups | gmane.comp.java.javagroups.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============6071130726612494213==
Content-Type: multipart/alternative;
boundary="----=_Part_566289_843951132.1450895413071"
------=_Part_566289_843951132.1450895413071
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
>>I bet this occurs when trying to marshall Zab2PhasesHeader. Did you add=
=20
>>a magic-ID for your header, e.g.
>>ClassConfigurator.add(7200, Zab2PhasesHeader.class); ?=20
>>Also, you need to add your protocols as well, e.g.
>>ClassConfigurator.addProtocol(513, jzookeeper.Zab2Phases.class);
Yes, I added all protocol headers in jg-magic-map.xml, and added all protoc=
ols in jg-protocol-ids.xml files.
I think the problem is in channel object, why I think that because I tried =
to add line channel.getAddress() before channel.send(msg) the excption poin=
ts to channel.getAddress(), see below.=20
ZABHeader resetProtocol =3D new ZABHeader(ZABHeader.RESET);
Message msg =3D new Message(null).putHeader(ID, resetProtocol);
Address local_addr =3D channel.getAddress();// The exception occurs here.
channel.send(msg);
I will send stack trace tomorrow. Sorry for that.
=C2=A0Ibrahim
=20
On Wednesday, December 23, 2015 5:45 PM, JGroups - Dev mailing list [vi=
a JGroups] <[email protected]> wrote:
=20
=20
On 23/12/15 18:16, Development issues wrote:
> Thank you for replaying.
>
> Yes, I never reuse a message. The following is a part of my code where
> the exception occurs:
> Client code:
> ---
> ---
> --
> Zab2PhasesHeader resetProtocol =3D new Zab2PhasesHeader(Zab2PhasesHeader
> .RESET);
> Message msg =3D new Message(null).putHeader(ID, resetProtocol);
> channel.send(msg); // The exception point to this line.
You still haven't shown the stack trace.
I bet this occurs when trying to marshall Zab2PhasesHeader. Did you add=20
a magic-ID for your header, e.g.
ClassConfigurator.add(7200, Zab2PhasesHeader.class); ?
Also, you need to add your protocols as well, e.g.
ClassConfigurator.addProtocol(513, jzookeeper.Zab2Phases.class);
> Note that I have 3 protocols (ZabMain, Zab2Phases and ZabProb), each
> with its own header and stack. The same =C2=A0client code (above code) is
> used (with different in protocol header) to benchmark all three
> protocols. The client code ran without any problems when I benchmark
> the protocols ZabMain and ZabProb. The problem only occurs when I
> benchmark the Zab2Phases protocol.
>
> The following is Zab2Phases stack as requested:
>
> <config xmlns=3D"urn:org:jgroups"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xmlns:xsi=3D"http://www.w3.org/2001/XML=
Schema-instance"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xsi:schemaLocation=3D"urn:org:jgroups
> http://www.jgroups.org/schema/JGroups-3.3.xsd">
> =C2=A0 =C2=A0 =C2=A0<UDP
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mcast_port=3D"${jgroups.u=
dp.mcast_port:45588}"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tos=3D"8"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0max_bundle_size=3D"64K"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0max_bundle_timeout=3D"30"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enable_diagnostics=3D"tru=
e"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread_naming_pattern=3D"=
cl"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ip_mcast=3D"false"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer_type=3D"new3"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer.min_threads=3D"10"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer.max_threads=3D"10"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer.keep_alive_time=3D"=
3000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer.queue_max_size=3D"5=
00"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timer.rejection_policy=3D=
"abort"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread_pool.enabled=3D"tr=
ue"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread_pool.min_threads=
=3D"2"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread_pool.max_threads=
=3D"8"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread_pool.keep_alive_ti=
me=3D"5000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread_pool.queue_enabled=
=3D"true"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread_pool.queue_max_siz=
e=3D"10000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0thread_pool.rejection_pol=
icy=3D"discard"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oob_thread_pool.enabled=
=3D"true"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oob_thread_pool.min_threa=
ds=3D"1"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oob_thread_pool.max_threa=
ds=3D"8"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oob_thread_pool.keep_aliv=
e_time=3D"5000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oob_thread_pool.queue_ena=
bled=3D"false"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oob_thread_pool.queue_max=
_size=3D"100"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0oob_thread_pool.rejection=
_policy=3D"discard"/>
>
> =C2=A0 =C2=A0 =C2=A0<FILE_PING
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0timeout=3D"2000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0num_initial_members=3D"20=
"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0location=3D"/home/pg/p13/=
a6915654/"/>
> =C2=A0 =C2=A0 =C2=A0<MERGE2 max_interval=3D"30000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0min_interval=3D"10000"/>
> =C2=A0 =C2=A0 =C2=A0<FD_SOCK/>
> =C2=A0 =C2=A0 =C2=A0<FD_ALL/>
> =C2=A0 =C2=A0 =C2=A0<VERIFY_SUSPECT timeout=3D"1500" =C2=A0/>
> =C2=A0 =C2=A0 =C2=A0<BARRIER/>
> =C2=A0 =C2=A0 =C2=A0<pbcast.NAKACK2 xmit_interval=3D"1000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0xmit_table_num_rows=3D"100"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0xmit_table_msgs_per_row=3D"2000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0xmit_table_max_compaction_time=3D"30000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0max_msg_batch_size=3D"500"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0use_mcast_xmit=3D"false"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0discard_delivered_msgs=3D"true"/>
> =C2=A0 =C2=A0 =C2=A0<UNICAST3 xmit_interval=3D"500"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xmit_table_num_row=
s=3D"100"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xmit_table_msgs_pe=
r_row=3D"2000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0xmit_table_max_com=
paction_time=3D"60000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0conn_expiry_timeou=
t=3D"0"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0max_msg_batch_size=
=3D"500"/>
> =C2=A0 =C2=A0 =C2=A0<pbcast.STABLE stability_delay=3D"1000" desired_avg_g=
ossip=3D"50000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 max=
_bytes=3D"4M"/>
> =C2=A0 =C2=A0 =C2=A0 <pbcast.GMS print_local_addr=3D"true" join_timeout=
=3D"3000"
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0view_bundli=
ng=3D"true"/>
> =C2=A0 =C2=A0 =C2=A0<UFC/>
> =C2=A0 =C2=A0 =C2=A0<MFC/>
> =C2=A0 =C2=A0 =C2=A0<RSVP resend_interval=3D"2000" timeout=3D"10000"/>
> =C2=A0 =C2=A0 =C2=A0<jzookeeper.Zab2Phases />
> =C2=A0 =C2=A0 =C2=A0<FRAG2 frag_size=3D"60K" =C2=A0/>
> =C2=A0 =C2=A0 =C2=A0<pbcast.STATE_TRANSFER />
> </config>
>
>
> Thank you indeed.
>
> Ibrahim
>
> The stack trace is as following?
> Ibrahim EL-Sanosi PHD student [hidden email]
> </user/SendEmail.jtp?type=3Dnode&node=3D10920&i=3D0>
>
>
> On Wednesday, December 23, 2015 7:22 AM, JGroups - Dev mailing list [via
> JGroups] <[hidden email] </user/SendEmail.jtp?type=3Dnode&node=3D10920&i=
=3D1>>
> wrote:
>
>
> What's the stack trace?
>
> I hope you're not reusing the message, as in:
>
> Message msg=3Dnew Message(null, "hello world');
> for(int i=3D0; i < 5; i++)
> =C2=A0 =C2=A0 =C2=A0ch.send(msg);
>
> This is incorrect as the send modifies the message. The correct code
> would be:
>
>
> for(int i=3D0; i < 5; i++) {
> =C2=A0 =C2=A0 Message msg=3Dnew Message(null, "hello world');
> =C2=A0 =C2=A0 =C2=A0ch.send(msg);
> }
>
> On 22/12/15 22:39, Development issues wrote:
>
> =C2=A0> I have a cluster consist of 5 machines, 3 allocated for services =
and
> 2 for
> =C2=A0> clients. I start the cluster and build a channel without any prob=
lem.
> Also
> =C2=A0> clients manage to send a request to the servers using channel.sen=
d(msg).
> =C2=A0>
> =C2=A0> However, when I use channel.send(msg) again (in client side), it
> gives me
> =C2=A0> NullPointerException. Moreover, NullPointerException point to lin=
e where
> =C2=A0> channel.send(msg) is.
> =C2=A0>
> =C2=A0> Can anyone tell what does cause such problem?
> =C2=A0>
> =C2=A0> Thank you
> =C2=A0>
> =C2=A0> Ibrahim
>
> --
> Bela Ban, JGroups lead (http://www.jgroups.org=C2=A0<http://www.jgroups.o=
rg/>)
>
>
> -------------------------------------------------------------------------=
-----
>
> _______________________________________________
> Javagroups-development mailing list
>
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://jgroups.1086181.n5.nabble.com/What-does-cause-NullPointerException=
-tp10915p10918.html
>
> To unsubscribe from What does cause NullPointerException?, click here.
> NAML
> <http://jgroups.1086181.n5.nabble.com/template/NamlServlet.jtp?macro=3Dma=
cro_viewer&id=3Dinstant_html%21nabble%3Aemail.naml&base=3Dnabble.naml.names=
paces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.w=
eb.template.NodeNamespace&breadcrumbs=3Dnotify_subscribers%21nabble%3Aemail=
.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aem=
ail.naml>
>
>
>
>
> ------------------------------------------------------------------------
> View this message in context: Re: What does cause NullPointerException?
> <http://jgroups.1086181.n5.nabble.com/What-does-cause-NullPointerExceptio=
n-tp10915p10920.html>
> Sent from the JGroups - Dev mailing list archive
> <http://jgroups.1086181.n5.nabble.com/JGroups-Dev-f6604.html> at Nabble.c=
om.
>
>
> -------------------------------------------------------------------------=
-----
>
>
>
> _______________________________________________
> Javagroups-development mailing list
>
--=20
Bela Ban, JGroups lead (http://www.jgroups.org)
---------------------------------------------------------------------------=
---
_______________________________________________
Javagroups-development mailing list
=20
=20
If you reply to this email, your message will be added to the discussion=
below: http://jgroups.1086181.n5.nabble.com/What-does-cause-NullPointerExc=
eption-tp10915p10921.html To unsubscribe from What does cause NullPointer=
Exception?, click here.
NAML=20
--
View this message in context: http://jgroups.1086181.n5.nabble.com/What-doe=
s-cause-NullPointerException-tp10915p10922.html
Sent from the JGroups - Dev mailing list archive at Nabble.com.
------=_Part_566289_843951132.1450895413071
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
<div style=3D"color:#000; background-color:#fff; font-family:bookman old st=
yle, new york, times, serif;font-size:16px"><div dir=3D"ltr" id=3D"yui_3_16=
_0_1_1450887951598_20588">>>I bet this occurs when trying to marshall=
Zab2PhasesHeader. Did you add=20
<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_20704" clear=3D"none">>&=
gt;a magic-ID for your header, e.g.
<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_20706" clear=3D"none">>&=
gt;ClassConfigurator.add(7200, Zab2PhasesHeader.class); ? <br></div><div id=
=3D"yui_3_16_0_1_1450887951598_21189" dir=3D"ltr">>>Also, you need to=
add your protocols as well, e.g.
<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_20712" clear=3D"none">>&=
gt;ClassConfigurator.addProtocol(513, jzookeeper.Zab2Phases.class);</div><d=
iv id=3D"yui_3_16_0_1_1450887951598_20713" dir=3D"ltr"><br></div><div id=3D=
"yui_3_16_0_1_1450887951598_20742" dir=3D"ltr">Yes, I added all protocol he=
aders in jg-magic-map.xml, and added all protocols in jg-protocol-ids.xml f=
iles.</div><div id=3D"yui_3_16_0_1_1450887951598_21224" dir=3D"ltr"><br></d=
iv><div id=3D"yui_3_16_0_1_1450887951598_21377" dir=3D"ltr">I think the pro=
blem is in channel object, why I think that because I tried to add line cha=
nnel.getAddress() before channel.send(msg) the excption points to channel.g=
etAddress(), see below. </div><div id=3D"yui_3_16_0_1_1450887951598_21411" =
dir=3D"ltr"><br></div><div id=3D"yui_3_16_0_1_1450887951598_21418" dir=3D"l=
tr">ZABHeader resetProtocol =3D new ZABHeader(ZABHeader.RESET);<br class=3D=
"" id=3D"yui_3_16_0_1_1450887951598_21413">Message msg =3D new Message(null=
).putHeader(ID, resetProtocol);<br class=3D"" id=3D"yui_3_16_0_1_1450887951=
598_21415">Address local_addr =3D channel.getAddress();// The exception occ=
urs here.<br></div><div id=3D"yui_3_16_0_1_1450887951598_21419" dir=3D"ltr"=
> channel.send(msg);<br></div><div id=3D"yui_3_16_0_1_1450887951598_20950" =
dir=3D"ltr"><br></div><div id=3D"yui_3_16_0_1_1450887951598_21177" dir=3D"l=
tr">I will send stack trace tomorrow. Sorry for that.<br></div><div id=3D"y=
ui_3_16_0_1_1450887951598_20589"> </div><div id=3D"yui_3_16_0_1_145088=
7951598_20590" class=3D"signature">Ibrahim<br></div> <div id=3D"yui_3_16_0_=
1_1450887951598_20614" class=3D"qtdSeparateBR"><br><br></div><div style=3D"=
display: block;" id=3D"yui_3_16_0_1_1450887951598_20611" class=3D"yahoo_quo=
ted"> <div id=3D"yui_3_16_0_1_1450887951598_20610" style=3D"font-family: bo=
okman old style, new york, times, serif; font-size: 16px;"> <div id=3D"yui_=
3_16_0_1_1450887951598_20609" style=3D"font-family: HelveticaNeue, Helvetic=
a Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <di=
v id=3D"yui_3_16_0_1_1450887951598_20613" dir=3D"ltr"><font id=3D"yui_3_16_=
0_1_1450887951598_20612" size=3D"2" face=3D"Arial"> On Wednesday, December =
23, 2015 5:45 PM, JGroups - Dev mailing list [via JGroups] <<a href=3D"/=
user/SendEmail.jtp?type=3Dnode&node=3D10922&i=3D0" target=3D"_top" rel=3D"n=
ofollow" link=3D"external">[hidden email]</a>> wrote:<br></font></div> =
<br><br> <div id=3D"yui_3_16_0_1_1450887951598_20622" class=3D"y_msg_contai=
ner"><div id=3D"yiv9229430074"><div id=3D"yui_3_16_0_1_1450887951598_20621"=
><br clear=3D"none"><br clear=3D"none">On 23/12/15 18:16, Development issue=
s wrote:
<div class=3D"yiv9229430074shrinkable-quote"><div class=3D'shrinkable-quote=
'><br clear=3D"none">> Thank you for replaying.
<br clear=3D"none">>
<br clear=3D"none">> Yes, I never reuse a message. The following is a pa=
rt of my code where
<br clear=3D"none">> the exception occurs:
<br clear=3D"none">> Client code:
<br clear=3D"none">> ---
<br clear=3D"none">> ---
<br clear=3D"none">> --
<br clear=3D"none">> Zab2PhasesHeader resetProtocol =3D new Zab2PhasesHe=
ader(Zab2PhasesHeader
<br clear=3D"none">> .RESET);
<br clear=3D"none">> Message msg =3D new Message(null).putHeader(ID, res=
etProtocol);
<br clear=3D"none">> channel.send(msg); // The exception point to this l=
ine.
</div></div>You still haven't shown the stack trace.
<br clear=3D"none">I bet this occurs when trying to marshall Zab2PhasesHead=
er. Did you add=20
<br clear=3D"none">a magic-ID for your header, e.g.
<br clear=3D"none">ClassConfigurator.add(7200, Zab2PhasesHeader.class); ?
<br clear=3D"none"><br clear=3D"none">Also, you need to add your protocols =
as well, e.g.
<br clear=3D"none">ClassConfigurator.addProtocol(513, jzookeeper.Zab2Phases=
.class);
<br clear=3D"none"><br clear=3D"none"><br clear=3D"none"><div class=3D"yiv9=
229430074shrinkable-quote"><div class=3D'shrinkable-quote'><br clear=3D"non=
e">> Note that I have 3 protocols (ZabMain, Zab2Phases and ZabProb), eac=
h
<br clear=3D"none">> with its own header and stack. The same clien=
t code (above code) is
<br clear=3D"none">> used (with different in protocol header) to benchma=
rk all three
<br clear=3D"none">> protocols. The client code ran without any problems=
when I benchmark
<br clear=3D"none">> the protocols ZabMain and ZabProb. The problem only=
occurs when I
<br clear=3D"none">> benchmark the Zab2Phases protocol.
<br clear=3D"none">>
<br clear=3D"none">> The following is Zab2Phases stack as requested:
<br clear=3D"none">>
<br clear=3D"none">> <config xmlns=3D"urn:org:jgroups"
<br clear=3D"none">> xmlns:xsi=3D"<a r=
el=3D"nofollow" shape=3D"rect" target=3D"_blank" href=3D"http://www.w3.org/=
2001/XMLSchema-instance" link=3D"external">http://www.w3.org/2001/XMLSchema=
-instance</a>"
<br clear=3D"none">> xsi:schemaLocatio=
n=3D"urn:org:jgroups
<br clear=3D"none">> <a rel=3D"nofollow" shape=3D"rect" target=3D"_blank=
" href=3D"http://www.jgroups.org/schema/JGroups-3.3.xsd" link=3D"external">=
http://www.jgroups.org/schema/JGroups-3.3.xsd</a>">
<br clear=3D"none">> <UDP
<br clear=3D"none">> mca=
st_port=3D"${jgroups.udp.mcast_port:45588}"
<br clear=3D"none">> tos=
=3D"8"
<br clear=3D"none">> max=
_bundle_size=3D"64K"
<br clear=3D"none">> max=
_bundle_timeout=3D"30"
<br clear=3D"none">> ena=
ble_diagnostics=3D"true"
<br clear=3D"none">> thr=
ead_naming_pattern=3D"cl"
<br clear=3D"none">> ip_=
mcast=3D"false"
<br clear=3D"none">> tim=
er_type=3D"new3"
<br clear=3D"none">> tim=
er.min_threads=3D"10"
<br clear=3D"none">> tim=
er.max_threads=3D"10"
<br clear=3D"none">> tim=
er.keep_alive_time=3D"3000"
<br clear=3D"none">> tim=
er.queue_max_size=3D"500"
<br clear=3D"none">> tim=
er.rejection_policy=3D"abort"
<br clear=3D"none">> thr=
ead_pool.enabled=3D"true"
<br clear=3D"none">> thr=
ead_pool.min_threads=3D"2"
<br clear=3D"none">> thr=
ead_pool.max_threads=3D"8"
<br clear=3D"none">> thr=
ead_pool.keep_alive_time=3D"5000"
<br clear=3D"none">> thr=
ead_pool.queue_enabled=3D"true"
<br clear=3D"none">> thr=
ead_pool.queue_max_size=3D"10000"
<br clear=3D"none">> thr=
ead_pool.rejection_policy=3D"discard"
<br clear=3D"none">> oob=
_thread_pool.enabled=3D"true"
<br clear=3D"none">> oob=
_thread_pool.min_threads=3D"1"
<br clear=3D"none">> oob=
_thread_pool.max_threads=3D"8"
<br clear=3D"none">> oob=
_thread_pool.keep_alive_time=3D"5000"
<br clear=3D"none">> oob=
_thread_pool.queue_enabled=3D"false"
<br clear=3D"none">> oob=
_thread_pool.queue_max_size=3D"100"
<br clear=3D"none">> oob=
_thread_pool.rejection_policy=3D"discard"/>
<br clear=3D"none">>
<br clear=3D"none">> <FILE_PING
<br clear=3D"none">> tim=
eout=3D"2000"
<br clear=3D"none">> num=
_initial_members=3D"20"
<br clear=3D"none">> loc=
ation=3D"/home/pg/p13/a6915654/"/>
<br clear=3D"none">> <MERGE2 max_interval=3D"3000=
0"
<br clear=3D"none">> min=
_interval=3D"10000"/>
<br clear=3D"none">> <FD_SOCK/>
<br clear=3D"none">> <FD_ALL/>
<br clear=3D"none">> <VERIFY_SUSPECT timeout=3D"1=
500" />
<br clear=3D"none">> <BARRIER/>
<br clear=3D"none">> <pbcast.NAKACK2 xmit_interva=
l=3D"1000"
<br clear=3D"none">> &n=
bsp; xmit_table_num_rows=3D"100"
<br clear=3D"none">> &n=
bsp; xmit_table_msgs_per_row=3D"2000"
<br clear=3D"none">> &n=
bsp; xmit_table_max_compaction_time=3D"30000"
<br clear=3D"none">> &n=
bsp; max_msg_batch_size=3D"500"
<br clear=3D"none">> &n=
bsp; use_mcast_xmit=3D"false"
<br clear=3D"none">> &n=
bsp; discard_delivered_msgs=3D"true"/>
<br clear=3D"none">> <UNICAST3 xmit_interval=3D"5=
00"
<br clear=3D"none">> &n=
bsp;xmit_table_num_rows=3D"100"
<br clear=3D"none">> &n=
bsp;xmit_table_msgs_per_row=3D"2000"
<br clear=3D"none">> &n=
bsp;xmit_table_max_compaction_time=3D"60000"
<br clear=3D"none">> &n=
bsp;conn_expiry_timeout=3D"0"
<br clear=3D"none">> &n=
bsp;max_msg_batch_size=3D"500"/>
<br clear=3D"none">> <pbcast.STABLE stability_del=
ay=3D"1000" desired_avg_gossip=3D"50000"
<br clear=3D"none">> &n=
bsp; max_bytes=3D"4M"/>
<br clear=3D"none">> <pbcast.GMS print_local_add=
r=3D"true" join_timeout=3D"3000"
<br clear=3D"none">> &n=
bsp; view_bundling=3D"true"/>
<br clear=3D"none">> <UFC/>
<br clear=3D"none">> <MFC/>
<br clear=3D"none">> <RSVP resend_interval=3D"200=
0" timeout=3D"10000"/>
<br clear=3D"none">> <jzookeeper.Zab2Phases />
<br clear=3D"none">> <FRAG2 frag_size=3D"60K" &nb=
sp;/>
<br clear=3D"none">> <pbcast.STATE_TRANSFER />
<br clear=3D"none">> </config>
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> Thank you indeed.
<br clear=3D"none">>
<br clear=3D"none">> Ibrahim
<br clear=3D"none">>
<br clear=3D"none">> The stack trace is as following?
<br clear=3D"none">> Ibrahim EL-Sanosi PHD student [hidden email]
<br clear=3D"none">> </user/SendEmail.jtp?type=3Dnode&node=3D1092=
0&i=3D0>
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> On Wednesday, December 23, 2015 7:22 AM, JGroups - =
Dev mailing list [via
<br clear=3D"none">> JGroups] <[hidden email] </user/SendEmail.jtp=
?type=3Dnode&node=3D10920&i=3D1>>
<br clear=3D"none">> wrote:
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> What's the stack trace?
<br clear=3D"none">>
<br clear=3D"none">> I hope you're not reusing the message, as in:
<br clear=3D"none">>
<br clear=3D"none">> Message msg=3Dnew Message(null, "hello world');
<br clear=3D"none">> for(int i=3D0; i < 5; i++)
<br clear=3D"none">> ch.send(msg);
<br clear=3D"none">>
<br clear=3D"none">> This is incorrect as the send modifies the message.=
The correct code
<br clear=3D"none">> would be:
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> for(int i=3D0; i < 5; i++) {
<br clear=3D"none">> Message msg=3Dnew Message(null, "hell=
o world');
<br clear=3D"none">> ch.send(msg);
<br clear=3D"none">> }
<br clear=3D"none">>
<br clear=3D"none">> On 22/12/15 22:39, Development issues wrote:
<br clear=3D"none">>
<br clear=3D"none">> > I have a cluster consist of 5 machines, =
3 allocated for services and
<br clear=3D"none">> 2 for
<br clear=3D"none">> > clients. I start the cluster and build a=
channel without any problem.
<br clear=3D"none">> Also
<br clear=3D"none">> > clients manage to send a request to the =
servers using channel.send(msg).
<br clear=3D"none">> >
<br clear=3D"none">> > However, when I use channel.send(msg) ag=
ain (in client side), it
<br clear=3D"none">> gives me
<br clear=3D"none">> > NullPointerException. Moreover, NullPoin=
terException point to line where
<br clear=3D"none">> > channel.send(msg) is.
<br clear=3D"none">> >
<br clear=3D"none">> > Can anyone tell what does cause such pro=
blem?
<br clear=3D"none">> >
<br clear=3D"none">> > Thank you
<br clear=3D"none">> >
<br clear=3D"none">> > Ibrahim
<br clear=3D"none">>
<br clear=3D"none">> --
<br clear=3D"none">> Bela Ban, JGroups lead (<a rel=3D"nofollow" shape=
=3D"rect" target=3D"_blank" href=3D"http://www.jgroups.org/" link=3D"extern=
al">http://www.jgroups.org</a> <<a rel=3D"nofollow" shape=3D"rect" =
target=3D"_blank" href=3D"http://www.jgroups.org/" link=3D"external">http:/=
/www.jgroups.org/</a>>)
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> ---------------------------------------------------=
---------------------------
<br clear=3D"none">>
<br clear=3D"none">> _______________________________________________
<br clear=3D"none">> Javagroups-development mailing list
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> ---------------------------------------------------=
---------------------
<br clear=3D"none">> If you reply to this email, your message will be ad=
ded to the discussion
<br clear=3D"none">> below:
<br clear=3D"none">> <a rel=3D"nofollow" shape=3D"rect" target=3D"_blank=
" href=3D"http://jgroups.1086181.n5.nabble.com/What-does-cause-NullPointerE=
xception-tp10915p10918.html" link=3D"external">http://jgroups.1086181.n5.na=
bble.com/What-does-cause-NullPointerException-tp10915p10918.html</a><br cle=
ar=3D"none">>
<br clear=3D"none">> To unsubscribe from What does cause NullPointerExce=
ption?, click here.
<br clear=3D"none">> NAML
<br clear=3D"none">> <<a rel=3D"nofollow" shape=3D"rect" target=3D"_b=
lank" href=3D"http://jgroups.1086181.n5.nabble.com/template/NamlServlet.jtp=
?macro=3Dmacro_viewer&id=3Dinstant_html%21nabble%3Aemail.naml&base=
=3Dnabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNam=
espace-nabble.view.web.template.NodeNamespace&breadcrumbs=3Dnotify_subs=
cribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_ins=
tant_email%21nabble%3Aemail.naml" link=3D"external">http://jgroups.1086181.=
n5.nabble.com/template/NamlServlet.jtp?macro=3Dmacro_viewer&id=3Dinstan=
t_html%21nabble%3Aemail.naml&base=3Dnabble.naml.namespaces.BasicNamespa=
ce-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNa=
mespace&breadcrumbs=3Dnotify_subscribers%21nabble%3Aemail.naml-instant_=
emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml</a>&g=
t;
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> ---------------------------------------------------=
---------------------
<br clear=3D"none">> View this message in context: Re: What does cause N=
ullPointerException?
<br clear=3D"none">> <<a rel=3D"nofollow" shape=3D"rect" target=3D"_b=
lank" href=3D"http://jgroups.1086181.n5.nabble.com/What-does-cause-NullPoin=
terException-tp10915p10920.html" link=3D"external">http://jgroups.1086181.n=
5.nabble.com/What-does-cause-NullPointerException-tp10915p10920.html</a>>=
;
<br clear=3D"none">> Sent from the JGroups - Dev mailing list archive
<br clear=3D"none">> <<a rel=3D"nofollow" shape=3D"rect" target=3D"_b=
lank" href=3D"http://jgroups.1086181.n5.nabble.com/JGroups-Dev-f6604.html" =
link=3D"external">http://jgroups.1086181.n5.nabble.com/JGroups-Dev-f6604.ht=
ml</a>> at Nabble.com.
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> ---------------------------------------------------=
---------------------------
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">>
<br clear=3D"none">> _______________________________________________
<br clear=3D"none">> Javagroups-development mailing list
<br clear=3D"none">>
</div></div>--=20
<br clear=3D"none">Bela Ban, JGroups lead (<a rel=3D"nofollow" shape=3D"rec=
t" target=3D"_blank" href=3D"http://www.jgroups.org/" link=3D"external">htt=
p://www.jgroups.org</a>)
<br clear=3D"none"><br clear=3D"none"><br clear=3D"none">------------------=
------------------------------------------------------------
<br clear=3D"none">_______________________________________________
<br clear=3D"none">Javagroups-development mailing list
<br clear=3D"none"><br clear=3D"none">
=09
=09
=09
=09<br clear=3D"none">
=09<br clear=3D"none">
=09<hr color=3D"#cccccc" noshade=3D"size=3D"1"">
=09<div style=3D"color:#444;font:12px tahoma, geneva, helvetica, arial, san=
s-serif;">
=09=09<div style=3D"font-weight:bold;">If you reply to this email, your mes=
sage will be added to the discussion below:</div>
=09=09<a rel=3D"nofollow" shape=3D"rect" target=3D"_blank" href=3D"http://j=
groups.1086181.n5.nabble.com/What-does-cause-NullPointerException-tp10915p1=
0921.html" link=3D"external">http://jgroups.1086181.n5.nabble.com/What-does=
-cause-NullPointerException-tp10915p10921.html</a>
=09</div><div class=3D"yiv9229430074yqt6973601642" id=3D"yiv9229430074yqtfd=
32262">
=09<div id=3D"yui_3_16_0_1_1450887951598_21658" style=3D"color:#666;font:11=
px tahoma, geneva, helvetica, arial, sans-serif;margin-top:.4em;line-height=
:1.5em;">
=09=09
=09=09To unsubscribe from What does cause NullPointerException?, <a rel=3D"=
nofollow" shape=3D"rect" target=3D"_blank" href=3D"" link=3D"external">clic=
k here</a>.<br clear=3D"none">
=09=09<a rel=3D"nofollow" shape=3D"rect" target=3D"_blank" href=3D"http://j=
groups.1086181.n5.nabble.com/template/NamlServlet.jtp?macro=3Dmacro_viewer&=
amp;id=3Dinstant_html%21nabble%3Aemail.naml&base=3Dnabble.naml.namespac=
es.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.=
template.NodeNamespace&breadcrumbs=3Dnotify_subscribers%21nabble%3Aemai=
l.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Ae=
mail.naml" style=3D"font:9px serif;" link=3D"external">NAML</a>
=09</div></div></div></div><br><br></div> </div> </div> </div></div>
=09
=09
=09
<br/><hr align=3D"left" width=3D"300" />
View this message in context: <a href=3D"http://jgroups.1086181.n5.nabble.c=
om/What-does-cause-NullPointerException-tp10915p10922.html">Re: What does c=
ause NullPointerException?</a><br/>
Sent from the <a href=3D"http://jgroups.1086181.n5.nabble.com/JGroups-Dev-f=
6604.html">JGroups - Dev mailing list archive</a> at Nabble.com.<br/>
------=_Part_566289_843951132.1450895413071--
--===============6071130726612494213==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
--===============6071130726612494213==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Javagroups-development mailing list
--===============6071130726612494213==--