Re: [jgroups-dev] What does cause NullPointerException?
Development issues <[email protected]> Wed, 23 Dec 2015 10:16:21 -0700 (MST)
| Newsgroups | gmane.comp.java.javagroups.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0800779985061108286==
Content-Type: multipart/alternative;
boundary="----=_Part_561625_1694393404.1450890981253"
------=_Part_561625_1694393404.1450890981253
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
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 .R=
ESET);
Message msg =3D new Message(null).putHeader(ID, resetProtocol);
channel.send(msg); // The exception point to this line.
Note that I have 3 protocols (ZabMain, Zab2Phases and ZabProb), each with i=
ts own header and stack. The same=C2=A0 client code (above code) is used (w=
ith different in protocol header) to benchmark all three protocols. The cli=
ent code ran without any problems when I benchmark=C2=A0 the protocols ZabM=
ain and ZabProb. The problem only occurs when I benchmark the Zab2Phases pr=
otocol.
The following is Zab2Phases stack as requested:
<config xmlns=3D"urn:org:jgroups"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xmlns:xsi=3D"http://www.w3.org/2=
001/XMLSchema-instance"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xsi:schemaLocation=3D"urn:org:jg=
roups 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=A0=C2=A0=C2=A0=C2=A0=C2=A0 mcast_po=
rt=3D"${jgroups.udp.mcast_port:45588}"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 tos=3D"8=
"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 max_bund=
le_size=3D"64K"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 max_bund=
le_timeout=3D"30"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 enable_d=
iagnostics=3D"true"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thread_n=
aming_pattern=3D"cl"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ip_mcast=
=3D"false"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 timer_ty=
pe=3D"new3"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 timer.mi=
n_threads=3D"10"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 timer.ma=
x_threads=3D"10"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 timer.ke=
ep_alive_time=3D"3000"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 timer.qu=
eue_max_size=3D"500"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 timer.re=
jection_policy=3D"abort"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thread_p=
ool.enabled=3D"true"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thread_p=
ool.min_threads=3D"2"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thread_p=
ool.max_threads=3D"8"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thread_p=
ool.keep_alive_time=3D"5000"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thread_p=
ool.queue_enabled=3D"true"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thread_p=
ool.queue_max_size=3D"10000"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 thread_p=
ool.rejection_policy=3D"discard"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 oob_thre=
ad_pool.enabled=3D"true"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 oob_thre=
ad_pool.min_threads=3D"1"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 oob_thre=
ad_pool.max_threads=3D"8"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 oob_thre=
ad_pool.keep_alive_time=3D"5000"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 oob_thre=
ad_pool.queue_enabled=3D"false"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 oob_thre=
ad_pool.queue_max_size=3D"100"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 oob_thre=
ad_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=A0=C2=A0=C2=A0=C2=A0=C2=A0 timeout=
=3D"2000"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 num_init=
ial_members=3D"20"
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 location=
=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=A0=C2=A0=C2=A0=C2=A0=C2=A0 min_inte=
rval=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=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xmit_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=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xmit_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=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xmit_table_max_compaction_time=3D"3=
0000"
=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 max_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=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 use_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=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 discard_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=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 xmit_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=A0=C2=A0=C2=
=A0 xmit_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=A0=C2=A0=C2=
=A0 xmit_table_max_compaction_time=3D"60000"
=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 conn_expiry_timeout=3D"0"
=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 max_msg_batch_size=3D"500"/>
=C2=A0=C2=A0=C2=A0 <pbcast.STABLE stability_delay=3D"1000" desired_avg_goss=
ip=3D"50000"
=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 max_bytes=3D"4M"/>
=C2=A0=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=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 view_bundling=3D"true"/>=C2=A0=20
=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?
=C2=A0Ibrahim EL-Sanosi PHD student [email protected]=20
On Wednesday, December 23, 2015 7:22 AM, JGroups - Dev mailing list [vi=
a JGroups] <[email protected]> wrote:
=20
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 ch.send(msg);
This is incorrect as the send modifies the message. The correct code=20
would be:
for(int i=3D0; i < 5; i++) {
=C2=A0 =C2=A0Message msg=3Dnew Message(null, "hello world');
=C2=A0 =C2=A0 ch.send(msg);
}
On 22/12/15 22:39, Development issues wrote:
> I have a cluster consist of 5 machines, 3 allocated for services and 2 fo=
r
> clients. I start the cluster and build a channel without any problem. Als=
o
> clients manage to send a request to the servers using channel.send(msg).
>
> However, when I use channel.send(msg) again (in client side), it gives me
> NullPointerException. Moreover, NullPointerException point to line where
> channel.send(msg) is.
>
> Can anyone tell what does cause such problem?
>
> Thank you
>
> Ibrahim
--=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-tp10915p10918.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-tp10915p10920.html
Sent from the JGroups - Dev mailing list archive at Nabble.com.
------=_Part_561625_1694393404.1450890981253
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 id=3D"yui_3_16_0_1_1450887=
951598_7634">Thank you for replaying.</div><div id=3D"yui_3_16_0_1_14508879=
51598_7635"><br></div><div id=3D"yui_3_16_0_1_1450887951598_7680">Yes, I ne=
ver reuse a message. The following is a part of my code where the exception=
occurs:<br></div><div id=3D"yui_3_16_0_1_1450887951598_7767">Client code:<=
/div><div id=3D"yui_3_16_0_1_1450887951598_7958">---</div><div id=3D"yui_3_=
16_0_1_1450887951598_7975">---</div><div id=3D"yui_3_16_0_1_1450887951598_7=
976">--<br></div><div dir=3D"ltr" id=3D"yui_3_16_0_1_1450887951598_7741">Za=
b2PhasesHeader resetProtocol =3D new Zab2PhasesHeader(Zab2PhasesHeader .RES=
ET);<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_7751">Message msg =3D n=
ew Message(null).putHeader(ID, resetProtocol);<br class=3D"" id=3D"yui_3_16=
_0_1_1450887951598_7753">channel.send(msg); // The exception point to this =
line.</div><div id=3D"yui_3_16_0_1_1450887951598_7861" dir=3D"ltr"><br></di=
v><div id=3D"yui_3_16_0_1_1450887951598_7867" dir=3D"ltr">Note that I have =
3 protocols (ZabMain, Zab2Phases and ZabProb), each with its own header and=
stack. The same client code (above code) is used (with different in =
protocol header) to benchmark all three protocols. The client code ran with=
out any problems when I benchmark the protocols ZabMain and ZabProb. =
The problem only occurs when I benchmark the Zab2Phases protocol.<br></div>=
<div id=3D"yui_3_16_0_1_1450887951598_7888" dir=3D"ltr"><br></div><div id=
=3D"yui_3_16_0_1_1450887951598_8327" dir=3D"ltr">The following is Zab2Phase=
s stack as requested:<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8339">=
<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8341"><config xmlns=3D"u=
rn:org:jgroups"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8343"> =
xmlns:xsi=3D"http://www.w3.org/2001/XM=
LSchema-instance"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8345">&nbs=
p; xsi:schemaLocation=3D"urn:org:jgroup=
s http://www.jgroups.org/schema/JGroups-3.3.xsd"><br class=3D"" id=3D"yu=
i_3_16_0_1_1450887951598_8347"> <UDP<br class=3D"" id=
=3D"yui_3_16_0_1_1450887951598_8349"> &n=
bsp; mcast_port=3D"${jgroups.udp.mcast_port:45588}"=
<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8351"> &nb=
sp; tos=3D"8"<br class=3D"" id=3D=
"yui_3_16_0_1_1450887951598_8353">  =
; max_bundle_size=3D"64K"<br class=3D"" id=3D"yui_3=
_16_0_1_1450887951598_8355">  =
; max_bundle_timeout=3D"30"<br class=3D"" id=3D"yui_3_16_=
0_1_1450887951598_8357"> &nb=
sp; enable_diagnostics=3D"true"<br class=3D"" id=3D"yui_3_16_0_=
1_1450887951598_8359">  =
; thread_naming_pattern=3D"cl"<br class=3D"" id=3D"yui_3_16_0_1=
_1450887951598_8361"> =
ip_mcast=3D"false"<br class=3D"" id=3D"yui_3_16_0_1_1450887951=
598_8363">  =
; timer_type=3D"new3"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8365">=
timer.mi=
n_threads=3D"10"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8367"> =
; timer.max_thr=
eads=3D"10"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8369"> &nbs=
p; timer.keep_alive_t=
ime=3D"3000"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8371"> &nb=
sp; timer.queue_max_s=
ize=3D"500"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8373"> &nbs=
p; timer.rejection_po=
licy=3D"abort"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8375"> &=
nbsp; thread_pool.ena=
bled=3D"true"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8377"> &n=
bsp; thread_pool.min_=
threads=3D"2"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8379"> &n=
bsp; thread_pool.max_=
threads=3D"8"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8381"> &n=
bsp; thread_pool.keep=
_alive_time=3D"5000"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8383">&=
nbsp; thread_po=
ol.queue_enabled=3D"true"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_83=
85"> thre=
ad_pool.queue_max_size=3D"10000"<br class=3D"" id=3D"yui_3_16_0_1_145088795=
1598_8387"> &nbs=
p; thread_pool.rejection_policy=3D"discard"<br class=3D"" id=3D"yui_3_16_0_=
1_1450887951598_8389">  =
; oob_thread_pool.enabled=3D"true"<br class=3D"" id=3D"yui_3_16=
_0_1_1450887951598_8391"> &n=
bsp; oob_thread_pool.min_threads=3D"1"<br class=3D"" id=3D"yui_=
3_16_0_1_1450887951598_8393"> &nbs=
p; oob_thread_pool.max_threads=3D"8"<br class=3D"" id=3D"=
yui_3_16_0_1_1450887951598_8395"> =
oob_thread_pool.keep_alive_time=3D"5000"<br class=
=3D"" id=3D"yui_3_16_0_1_1450887951598_8397"> =
oob_thread_pool.queue_enabled=3D"false=
"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8399"> &n=
bsp; oob_thread_pool.queue_max_si=
ze=3D"100"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8401">  =
; oob_thread_pool.rej=
ection_policy=3D"discard"/><br class=3D"" id=3D"yui_3_16_0_1_14508879515=
98_8403"><br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8405"> =
<FILE_PING<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8407">&=
nbsp; timeout=
=3D"2000"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8409"> =
num_initial_members=
=3D"20"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8411"> &n=
bsp; location=3D"/home/pg/p=
13/a6915654/"/><br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8413">&nb=
sp; <MERGE2 max_interval=3D"30000"<br class=3D"" id=3D"yui_3=
_16_0_1_1450887951598_8415">  =
; min_interval=3D"10000"/><br class=3D"" id=3D"yui_3_1=
6_0_1_1450887951598_8417"> <FD_SOCK/><br class=3D""=
id=3D"yui_3_16_0_1_1450887951598_8419"> <FD_ALL/><=
br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8421"> <=
;VERIFY_SUSPECT timeout=3D"1500" /><br class=3D"" id=3D"yui_3_16_0=
_1_1450887951598_8423"> <BARRIER/><br class=3D"" id=
=3D"yui_3_16_0_1_1450887951598_8425"> <pbcast.NAKACK2 =
xmit_interval=3D"1000"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8427"=
> &n=
bsp; xmit_table_num_rows=3D"100"<br cla=
ss=3D"" id=3D"yui_3_16_0_1_1450887951598_8429"> &nbs=
p; &=
nbsp; xmit_table_msgs_per_row=3D"2000"<br class=3D"" id=3D"yui_3_16_0=
_1_1450887951598_8431"> &nbs=
p; xmit_table_m=
ax_compaction_time=3D"30000"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598=
_8433"> &n=
bsp; max_msg_batch_size=3D"500"<b=
r class=3D"" id=3D"yui_3_16_0_1_1450887951598_8435">  =
; &n=
bsp; use_mcast_xmit=3D"false"<br class=3D"" id=3D"yui_3_16_0_1_=
1450887951598_8437"> &=
nbsp; discard_deliver=
ed_msgs=3D"true"/><br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8439">=
<UNICAST3 xmit_interval=3D"500"<br class=3D"" id=3D"y=
ui_3_16_0_1_1450887951598_8441"> &=
nbsp; xmit_table_num_rows=3D"100"<br class=3D=
"" id=3D"yui_3_16_0_1_1450887951598_8443"> &nb=
sp; xmit_table_msgs_per_row=3D"20=
00"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8445"> =
xmit_table_max=
_compaction_time=3D"60000"<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8=
447"> &nbs=
p; conn_expiry_timeout=3D"0"<br class=3D"" id=3D"yui_3_16_0_1_1450887=
951598_8449"> &n=
bsp; max_msg_batch_size=3D"500"/><br class=3D"" id=3D"yui_3_=
16_0_1_1450887951598_8451"> <pbcast.STABLE stability_d=
elay=3D"1000" desired_avg_gossip=3D"50000"<br class=3D"" id=3D"yui_3_16_0_1=
_1450887951598_8453"> =
max_bytes=3D"4M"/>=
;<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8455"> &n=
bsp; <pbcast.GMS print_local_addr=3D"true" join_timeout=3D"3000"<br clas=
s=3D"" id=3D"yui_3_16_0_1_1450887951598_8457">  =
; view_bundling=
=3D"true"/> <br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8459">=
<UFC/><br class=3D"" id=3D"yui_3_16_0_1_1450887951=
598_8461"> <MFC/><br class=3D"" id=3D"yui_3_16_0_1_=
1450887951598_8463"> <RSVP resend_interval=3D"2000" ti=
meout=3D"10000"/><br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8465">&=
nbsp; <jzookeeper.Zab2Phases /><br class=3D"" id=3D"yui_3=
_16_0_1_1450887951598_8467"> <FRAG2 frag_size=3D"60K"&=
nbsp; /><br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8469"> &nbs=
p; <pbcast.STATE_TRANSFER /><br class=3D"" id=3D"yui_3_16_0_1_1=
450887951598_8471"></config></div><div id=3D"yui_3_16_0_1_14508879515=
98_8877" dir=3D"ltr"><br></div><div id=3D"yui_3_16_0_1_1450887951598_8878" =
dir=3D"ltr"><br class=3D"" id=3D"yui_3_16_0_1_1450887951598_8473"></div><di=
v id=3D"yui_3_16_0_1_1450887951598_8855" dir=3D"ltr">Thank you indeed.</div=
><div id=3D"yui_3_16_0_1_1450887951598_8854" dir=3D"ltr"><br></div><div id=
=3D"yui_3_16_0_1_1450887951598_8879" dir=3D"ltr">Ibrahim<br></div><div id=
=3D"yui_3_16_0_1_1450887951598_7607"><br></div><div dir=3D"ltr" id=3D"yui_3=
_16_0_1_1450887951598_7606">The stack trace is as following?
<br class=3D"" id=3D"yui_3_16_0_1_1450887951598_7613"></div><div id=3D"yui_=
3_16_0_1_1450887951598_7390"><span></span></div><div id=3D"yui_3_16_0_1_145=
0887951598_7421"> </div><div id=3D"yui_3_16_0_1_1450887951598_7391" cl=
ass=3D"signature">Ibrahim EL-Sanosi
PHD student
<a href=3D"/user/SendEmail.jtp?type=3Dnode&node=3D10920&i=3D0" target=3D"_=
top" rel=3D"nofollow" link=3D"external">[hidden email]</a></div> <div id=3D=
"yui_3_16_0_1_1450887951598_7470" class=3D"qtdSeparateBR"><br><br></div><di=
v style=3D"display: block;" id=3D"yui_3_16_0_1_1450887951598_7583" class=3D=
"yahoo_quoted"> <div id=3D"yui_3_16_0_1_1450887951598_7582" style=3D"font-f=
amily: bookman old style, new york, times, serif; font-size: 16px;"> <div i=
d=3D"yui_3_16_0_1_1450887951598_7581" style=3D"font-family: HelveticaNeue, =
Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16p=
x;"> <div id=3D"yui_3_16_0_1_1450887951598_7689" dir=3D"ltr"><font id=3D"yu=
i_3_16_0_1_1450887951598_7740" size=3D"2" face=3D"Arial"> On Wednesday, Dec=
ember 23, 2015 7:22 AM, JGroups - Dev mailing list [via JGroups] <<a hre=
f=3D"/user/SendEmail.jtp?type=3Dnode&node=3D10920&i=3D1" target=3D"_top" re=
l=3D"nofollow" link=3D"external">[hidden email]</a>> wrote:<br></font></=
div> <br><br> <div id=3D"yui_3_16_0_1_1450887951598_7580" class=3D"y_msg_c=
ontainer"><div id=3D"yiv3570632135">
=09What's the stack trace?
<br><br>I hope you're not reusing the message, as in:
<br><br>Message msg=3Dnew Message(null, "hello world');
<br>for(int i=3D0; i < 5; i++)
<br> ch.send(msg);
<br><br>This is incorrect as the send modifies the message. The correct cod=
e=20
<br>would be:
<br><br><br>for(int i=3D0; i < 5; i++) {
<br> Message msg=3Dnew Message(null, "hello world');
<br> ch.send(msg);
<br>}
<br><br>On 22/12/15 22:39, Development issues wrote:
<div class=3D"yiv3570632135shrinkable-quote"><div class=3D'shrinkable-quote=
'><br>> I have a cluster consist of 5 machines, 3 allocated for services=
and 2 for
<br>> clients. I start the cluster and build a channel without any probl=
em. Also
<br>> clients manage to send a request to the servers using channel.send=
(msg).
<br>>
<br>> However, when I use channel.send(msg) again (in client side), it g=
ives me
<br>> NullPointerException. Moreover, NullPointerException point to line=
where
<br>> channel.send(msg) is.
<br>>
<br>> Can anyone tell what does cause such problem?
<br>>
<br>> Thank you
<br>>
<br>> Ibrahim
</div></div><br>--=20
<br>Bela Ban, JGroups lead (<a rel=3D"nofollow" target=3D"_blank" href=3D"h=
ttp://www.jgroups.org/" link=3D"external">http://www.jgroups.org</a>)
<br><br><br>---------------------------------------------------------------=
---------------
<br>_______________________________________________
<br>Javagroups-development mailing list
<br><br>
=09
=09
=09
=09<br>
=09<br>
=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" target=3D"_blank" href=3D"http://jgroups.1086181.=
n5.nabble.com/What-does-cause-NullPointerException-tp10915p10918.html" link=
=3D"external">http://jgroups.1086181.n5.nabble.com/What-does-cause-NullPoin=
terException-tp10915p10918.html</a>
=09</div>
=09<div style=3D"color:#666;font:11px tahoma, geneva, helvetica, arial, san=
s-serif;margin-top:.4em;line-height:1.5em;">
=09=09
=09=09To unsubscribe from What does cause NullPointerException?, <a rel=3D"=
nofollow" target=3D"_blank" href=3D"" link=3D"external">click here</a>.<br>
=09=09<a rel=3D"nofollow" target=3D"_blank" href=3D"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" styl=
e=3D"font:9px serif;" link=3D"external">NAML</a>
=09</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-tp10915p10920.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_561625_1694393404.1450890981253--
--===============0800779985061108286==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
--===============0800779985061108286==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Javagroups-development mailing list
--===============0800779985061108286==--