getMembershipService() returns null
Daniel Evers <[email protected]> Thu, 21 Dec 2006 09:14:04 +0100
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I have a (very basic) problem that I don't understand:
I have a peer A running JXTA for J2SE that creates and publishes a new
peer group, without any authentication or else. This looks like this:
ModuleImplAdvertisement groupAdv =
netPeerGroup.getAllPurposePeerGroupAdvertisement();
PeerGroupID groupID = IDFactory.netPeerGroupID();
PeerGroup newgroup = netPeerGroup.newGroup(groupID, groupAdv, name,
descr);
netPeerGroup.getDiscoveryService().remotePublish(newgroup);
// ... adding module class adv and spec adv ...
Then I have a peer B running JXTA for JXME/J2ME. This peer discovers the
new group (no problem here) and tries to join it, like this:
AuthenticationCredential cred = new AuthenticationCredential(newgroup,
null, null);
MembershipService membership = newgroup.getMembershipService();
Authenticator auth = membership.apply(cred);
if (auth.isReadyForJoin()) {
membership.join(auth);
} else {
// error handling
}
(the peer group "newgroup" here is created from the group adv)
The problem is, that newgroup.getMembershipService() returns null, and
as far as I understand, that should never be the case.
Has anybody got an idea what's going wrong? This worked without problems
before (changed some things in the meantime, but removed those changes
again).
Thanks!
Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFikJMBHvLeozhC4kRAsrSAKCXLoQwHukmputEe7TyhwZNVUhIdQCeP/ao
j3XfDoM73mqYhS5ysQ0G3H4=
=8Zef
-----END PGP SIGNATURE-----