powered by Jive Software

Problem with nextMessage

Ok, I’'ve tried using setFilteredOnThreadID(false) to no avail. I suspect this is a problem with newest Java rev. Is there a test suite available for download so I can verify this?


import org.jivesoftware.smack.*;

import org.jivesoftware.smack.packet.*;

public class Mita {

public static void main(String[] args) throws Exception {

try {

XMPPConnection con = new XMPPConnection(“jabber.mydomain.com”);

con.login(“userid”, “password”);

        Chat chat = con.createChat("mybuddy@jabber.mydomain.com");



while(true) {

Message reply = chat.nextMessage(1000);

if (reply != null) {

// this never gets called

chat.sendMessage("you said " + reply.getBody());




catch (Exception e) {






Huh… latest nightly dev build seems to fix it fine (10/4). Looks like the problem is aleady being addressed, cool!

Without the latest nightly build you would’'ve needed to call the setFilteredOnThreadID before you created the chat.

Ah, so before the chat is created, that helps. What I’'ve been seeing in the forums is simply to call it, but not explaining “when”. Thanks!