NullPointerException when inserting a value - single peer
Brought to you by:
skaffille
First reported in the mailing list:
http://sourceforge.net/mailarchive/forum.php?thread_name=a2343aec0806070457u5f6a2635k65ae2da3725a528b%40mail.gmail.com&forum_name=open-chord-users
When the network consists of a single peer a NullPointerException is caused by inserting a value into the DHT.
hi,I have met this problems.when I try to debug it,I find the codes between the version 1.04 and the version 1.05 are different!
version 1.0.4 Nodeimpl.java (246-251)
if ((this.references.getPredecessor() != null)
&& !toInsert.getId().isInInterval(
this.references.getPredecessor().nodeID, this.nodeID)) {
this.references.getPredecessor().insertEntry(toInsert);
return;
}
version 1.0.5 Nodeimpl.java (246-251)
if ((this.references.getPredecessor() == null)
|| !toInsert.getId().isInInterval(
this.references.getPredecessor().getNodeID(), this.nodeID)) {
this.references.getPredecessor().insertEntry(toInsert);
return;
}
so I try to use these codes in the version 1.0.4 to replace that codes in the version 1.0.5,then complie again,then success!
This issue will be fixed in the next release. For an interim solution please have a look at the following discussion on our mailing list:
http://sourceforge.net/mailarchive/forum.php?thread_name=a2343aec0806070457u5f6a2635k65ae2da3725a528b%40mail.gmail.com&forum_name=open-chord-users
Hi, thanks a lot Nobody, i did the same what you did and it`s worked properly!!!!
Thank you again and all who develope the open chord