Skip to main content

Peer Groups in JXTA 2.5 Beta

3 replies [Last post]
extortion
Offline
Joined: 2007-08-14
Points: 0

Hi,

I'm new to JXTA and I'm trying to create a simple P2P application using JXTA 2.5 Beta and even RC2. I'm having problems trying to create a Peer group. I'm trying to use the Password Protected Peer Group example in the JXTA 2.5 Programmers Guide however I get a bunch of deprecation errors.

Could someone be kind enough to post an example of how a simple group, say "TestGroup", could be created? I've tried many examples from the net but without any success. I would also like to keep using JXTA 2.5.

I thank you in advance for any replies.

Ext.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fszwt
Offline
Joined: 2007-08-11
Points: 0

hi,
I have some problems while creating private peergroup, which is protected by password service, after doing some google search, i found this thread is most relevant to my problem, following the suggestion here, i upgrade the lib to jxta2.5rc3,However, the warning still exists when executing " Boot.getNetPeerGroup().newGroup(adv)" :

---------------------------------------------------------------------------
Could not find a loadable implementation for SpecID: urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000010406
net.jxta.exception.PeerGroupException: Could not find group implementation with urn:jxta:uuid-DEADBEEFDEAFBABAFEEDBABE000000010406
at net.jxta.impl.peergroup.GenericPeerGroup.newGroup(GenericPeerGroup.java:1411)
at net.jxta.impl.peergroup.PeerGroupInterface.newGroup(PeerGroupInterface.java:315)

---------------------------------------------------------------------------
And plus some error message relate to the CM component:

Ignored exception
java.io.EOFException
at java.io.DataInputStream.readFully(Unknown Source)
at java.io.DataInputStream.readLong(Unknown Source)
at net.jxta.impl.xindice.core.filer.BTree$BTreeNode.read(BTree.java:601)
at net.jxta.impl.xindice.core.filer.BTree.getBTreeNode(BTree.java:463)
at net.jxta.impl.xindice.core.filer.BTree.access$800(BTree.java:109)
at net.jxta.impl.xindice.core.filer.BTree$BTreeNode.getChildNode(BTree.java:634)
at net.jxta.impl.xindice.core.filer.BTree$BTreeNode.findValue(BTree.java:849)
at net.jxta.impl.xindice.core.filer.BTree.findValue(BTree.java:262)
at net.jxta.impl.xindice.core.filer.BTreeFiler.readRecord(BTreeFiler.java:130)
at net.jxta.impl.cm.Indexer.writeRecord(Indexer.java:552)
at net.jxta.impl.cm.Indexer.addToIndex(Indexer.java:361)
at net.jxta.impl.cm.Cm.save(Cm.java:686)
at net.jxta.impl.discovery.DiscoveryServiceImpl.publish(DiscoveryServiceImpl.java:761)
at net.jxta.impl.discovery.DiscoveryServiceInterface.publish(DiscoveryServiceInterface.java:213)
at net.jxta.impl.endpoint.router.RouteCM.publishRoute(RouteCM.java:450)
at net.jxta.impl.endpoint.router.EndpointRouter.startApp(EndpointRouter.java:789)
at net.jxta.impl.peergroup.StdPeerGroup.startModules(StdPeerGroup.java:623)
at net.jxta.impl.peergroup.StdPeerGroup.initFirst(StdPeerGroup.java:833)
at net.jxta.impl.peergroup.ShadowPeerGroup.initFirst(ShadowPeerGroup.java:133)
at net.jxta.impl.peergroup.GenericPeerGroup.init(GenericPeerGroup.java:929)
at net.jxta.impl.peergroup.GenericPeerGroup.loadModule(GenericPeerGroup.java:709)
at net.jxta.impl.peergroup.GenericPeerGroup.loadModule(GenericPeerGroup.java:652)
at net.jxta.impl.peergroup.PeerGroupInterface.loadModule(PeerGroupInterface.java:290)
at net.jxta.peergroup.NetPeerGroupFactory.newNetPeerGroup(NetPeerGroupFactory.java:467)
at net.jxta.peergroup.NetPeerGroupFactory.(NetPeerGroupFactory.java:216)
.........

--------------------------------------------------------------------------

java.lang.NullPointerException
at net.jxta.impl.xindice.core.filer.BTree$BTreeNode.findValue(BTree.java:849)
at net.jxta.impl.xindice.core.filer.BTree.findValue(BTree.java:262)
at net.jxta.impl.xindice.core.filer.BTreeFiler.readRecord(BTreeFiler.java:130)
at net.jxta.impl.cm.Indexer.writeRecord(Indexer.java:552)
at net.jxta.impl.cm.Indexer.addToIndex(Indexer.java:361)
at net.jxta.impl.cm.Cm.save(Cm.java:686)
at net.jxta.impl.discovery.DiscoveryServiceImpl.publish(DiscoveryServiceImpl.java:761)
at net.jxta.impl.discovery.DiscoveryServiceInterface.publish(DiscoveryServiceInterface.java:213)
at net.jxta.impl.endpoint.router.RouteCM.publishRoute(RouteCM.java:450)
at net.jxta.impl.endpoint.router.EndpointRouter.startApp(EndpointRouter.java:789)
at net.jxta.impl.peergroup.StdPeerGroup.startModules(StdPeerGroup.java:623)
at net.jxta.impl.peergroup.StdPeerGroup.initFirst(StdPeerGroup.java:833)
at net.jxta.impl.peergroup.ShadowPeerGroup.initFirst(ShadowPeerGroup.java:133)
at net.jxta.impl.peergroup.GenericPeerGroup.init(GenericPeerGroup.java:929)
at net.jxta.impl.peergroup.GenericPeerGroup.loadModule(GenericPeerGroup.java:709)
at net.jxta.impl.peergroup.GenericPeerGroup.loadModule(GenericPeerGroup.java:652)
at net.jxta.impl.peergroup.PeerGroupInterface.loadModule(PeerGroupInterface.java:290)
at net.jxta.peergroup.NetPeerGroupFactory.newNetPeerGroup(NetPeerGroupFactory.java:467)
at net.jxta.peergroup.NetPeerGroupFactory.(NetPeerGroupFactory.java:216)
.......................
can anyone give me some help on this, thx.
terry.

bondolo
Offline
Joined: 2003-06-11
Points: 0

The EOFException and NullPointerException appear to be due to a corrupted CM cache. You should delete the cache.

Regarding the other problems with module loading--could you try the JXSE nightly build. Several updates have been made recently to try to track down the problem with module loading and should a failure occur the new code will provide a better indication of what went wrong.

bondolo
Offline
Joined: 2003-06-11
Points: 0

A bug in the 2.5RC2 source code prevents use of user defined peer groups other than the default peer group module implementation. This has been corrected as part of issue #56 (https://jxta-jxse.dev.java.net/issues/show_bug.cgi?id=56) The nightly build on August 16th should include the necessary fix.

One note: If I hadn't encountered the problem you describe myself I probably wouldn't have been able to figure out what you were talking about. It it generally very helpful if you can include error messages, relevant exceptions and stack traces as part of a problem report.

Thank you for the report!