powered by Jive Software

MultiUserChat Help

Hi,

I am trying to simulate a conference room by using a simple example illustrated by the example bellow but everytime I am getting the following error:

Exception in thread “main” recipient-unavailable(404)

Here is the code:

public void createInstantConference(XMPPConnection connection, String roomAddress, String roomName) throws XMPPException {
muc = new MultiUserChat(connection, roomAddress + “@conference.myHost”);
try {
muc.create(roomName);
} catch (XMPPException ex) {
Logger.getLogger(ConferenceChatProxy.class.getName()).log(Level.SEVERE, null, ex);
ex.printStackTrace();
System.out.println(ex.getMessage());
}
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
}

public static void main(String[] args) throws XMPPException {
ConferenceChatProxy ccp = new ConferenceChatProxy();
// XMPPConnection.DEBUG_ENABLED = true;
ConnectionConfiguration config = new ConnectionConfiguration(“myHost”, 5222, “serviceName”);
XMPPConnection connection = new XMPPConnection(config);
connection.connect();
connection.login(“akem”, “pass1”);

XMPPConnection connection2 = new XMPPConnection(config);
connection2.connect();
connection2.login(“kouami”, “pass2”);

ccp.createInstantConference(connection, “myGroup”, “roomName”);
muc.join(“roomName”);

muc.invite(“kouami”, “I would like you to join me”);

muc2 = new MultiUserChat(connection2,“myGroup@conference.host”);
muc2.join(“roomName”); // The exception is being thrown here

    try {
        Thread.sleep(60000);
    } catch (Exception e) {
    }
}

Any Help will be very much appreciated.

Thanks,

Emmanuel