powered by Jive Software

pubSubManager.getNode(); is giving exception

My code below :

public void myPubSub() throws XMPPException

** {**

** PubSubManager mgr = new PubSubManager(connection);**

** LeafNode node = (LeafNode) mgr.getNode(“testNode”);**

** node.addItemEventListener(new ItemEventCoordinator());**

** node.subscribe(myJID);**

** }//end pubsub**

is giving following exceptions:

Exception in thread “main” item-not-found(404)

at org.jivesoftware.smackx.pubsub.packet.SyncPacketSend.getReply(SyncPacketSend.ja va:53)

at org.jivesoftware.smackx.pubsub.packet.SyncPacketSend.getReply(SyncPacketSend.ja va:61)

at org.jivesoftware.smackx.pubsub.PubSubManager.getNode(PubSubManager.java:163)

at main.Main.myPubSub(Main.java:32)

at main.Main.login(Main.java:70)

at main.Main.main(Main.java:116)

**whyy **??

Looks like “testNode” does not exist.

1 Like