Cant create MUC room

hello,

I am trying to create a MUC room, but no luck. Code does not throw an error but MUC does not exist. ChatRoom has “Anyone can create a chatroom” permission and here is the code. Any help is appreciated.

public static void main(String[] args) {

XMPPConnection conn ;

ConnectionConfiguration cc = new ConnectionConfiguration(“chat.domain.com”);

conn = new XMPPConnection(cc);

try {

conn.connect();

conn.login(“admin”,“admin”);

}

catch (XMPPException e) {

e.printStackTrace();

}

try {

          MultiUserChat muc = new MultiUserChat(conn, "smacktest2@conference.chat.domain.com");

muc.create(“smackname-2”);

muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));

System.out.println(“Room Created”);

}

catch (XMPPException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

conn.disconnect();

}

before calling the conn.disconnect();

function apply this

BufferedReader obj = …;

obj.readLine();

Reason:-

Till the time u dont disconnect and also do not log off, all the transaction with the server will

stay alive…

Also after running the program do not press any key and check the GroupChat/ Rooms Summary in openfire. if ur room is created, if not try refreshing the webpage…

After u logout the room will be deleted from the rooms summary…

Check the documentation of smack also for “immediate and reserved rooms”.

Thanks for the info, not sure if I fully get the reasoning though.

I am just looking to create a persistent room, and then exit. The documentation does not make it very clear on how to set this option. Also there seems to be the need to set some default options b/c the room is “LOCKED” by default which is quite confusing.

Appreciate the help.

Adam