Skip to main content

Problem with Peergroup service creation

3 replies [Last post]
Joined: 2006-10-24


A month ago I finished reading Brendon Wilson's book about JXTA, and decided to implement a little JXTA application on my own, just to put things together...
It is a picture sharing app, which also gives the capability of chatting with other peers on the group. I decided to implement also the presence information service, as described in the book.
The problem is that code examples are a bit out of date, and they aren't working any more with JXTA 2.4.
I get a ServiceNotFoundException when I try to lookup the presence information service with the lookupService (ModuleClassID) method, as explained in chapter 10/11. I first tried with an unmodified version of the example, then I modified it to get partial rid of the deprecated parts and at last followed the "setUri" suggestion on, but I'm still getting ServiceNotFoundException.
I know I'm asking something that was previously asked, but I haven't been able to find the correct answer and after 10 days of try'n'fail I'm a bit lost and confused.
Please, could anyone tell me which is the correct way of creating, registering and finding peergroup services with the 2.4 release of JXTA?

Thanks for paying me attention.



Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-10-24

Hi Leo,
I'm sorry for this late reply, but a few days ago I moved to another flat and I won't have any internet connection for another week...
I'll try your suggestions as soon as possible, and I'll let You know the result (which hopefully will be a success :))
Thank you very much for your reply!
I hope with these changes I can make my service work...

Thanks again.



Joined: 2006-08-11

hi man, five days ago i had your same problem, 'cause i'm trying to create a service for a PeerGroup by myself with little luck. While i was thinking about my project, a lamp lights inside my head. I noticed that in the specification of my ModImplAdver and ModSpecAdver i omitted the URI and SpecURI fields, so that they were blank when i published them. At the beginning i thought they werent so important for the advertisement...i was forgiving. When i filled up this two fields, magically my service was published and ready to be used. That's all, if i understand your problem. If it's not, if you want you can send me your code and i check it. What do you think about?
Good luck!!

Joined: 2008-09-16

hi leodali
I have a problem to create a new service in new group when I use lookupService method.
my code is in the attachement,
I you knew the answer, please help me,
Thank you.