ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Any decent documentation for the JAVA plugin classes?

Post new topic  Reply to topic
 Any decent documentation for the JAVA plugin classes? « View previous topic :: View next topic » 
Author Message
Deeko
PostPosted: Wed Mar 20, 2002 12:38 am    Post subject: Reply with quote

Acolyte

Joined: 16 May 2001
Posts: 72
Location: Edinburgh, UK

Hi,

I'm having fun coding a JAVA plugin! I'm having difficulty in coding to cope with the navigation of all children of a parent in the message tree though! The docs that are supplied and the JavaDoc aren't really that useful! Anyone got any "special" IBM documentation? My specific problem just now is that if I do:


MbElement Cursor = .....getFirstChild();

while (cursor.getName() != null)
{
...
cursor = cursor.getNextSibling();
}

Then I get a null pointer exception (on the getNextSibling call) when I get past the last child of the parent...

Help!

Regards,

Derek.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
devans
PostPosted: Wed Mar 20, 2002 1:18 am    Post subject: Reply with quote

Apprentice

Joined: 18 Mar 2002
Posts: 43

I believe that getNextSibling() returns 'null' if there is no sibling. The condition in your loop will be trying to call a method on a null reference which will cause your exception.
Try changing your code to say

while(cursor != null)
{
...
}
Back to top
View user's profile Send private message
Deeko
PostPosted: Wed Mar 20, 2002 3:08 am    Post subject: Reply with quote

Acolyte

Joined: 16 May 2001
Posts: 72
Location: Edinburgh, UK

I'm sure I tried that...I'll give it a bash though!

Thanks,

Derek.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Deeko
PostPosted: Wed Mar 20, 2002 3:33 am    Post subject: Reply with quote

Acolyte

Joined: 16 May 2001
Posts: 72
Location: Edinburgh, UK

That worked! Thanks very much...

Regards,

Derek.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Any decent documentation for the JAVA plugin classes?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.