Creating non-persistent room--404 when others try to join. (locked)?

Hello all,

another question.

I create a persistent room with no problem…when I try to create a non persistent room, it is created ok but when another user tries to join I get a 404 error. Cant figure out how to “unlock” the room.

Here is my code for creating the room:

public void createMultiUserChat(Object conn,String room_name)
{
try
{
XMPPConnection connx = (XMPPConnection) conn;
System.out.println(connx.getUser());
String user = connx.getUser().substring(0,connx.getUser().indexOf("@"));
MultiUserChat muc = new MultiUserChat(connx,room_name+CONFERENCE_SERVICE_NAME);
muc.create(user);
Form form = muc.getConfigurationForm();
Form newForm = form.createAnswerForm();
for (Iterator fields = form.getFields(); fields.hasNext():wink:
{
FormField field = (FormField) fields.next();
if (!FormField.TYPE_HIDDEN.equals(field.getType()) && field.getVariable() != null)
{
// Sets the default value as the answer
newForm.setDefaultAnswer(field.getVariable());
}
}
newForm.setAnswer(“muc#roomconfig_publicroom”,true);
newForm.setAnswer(“muc#roomconfig_passwordprotectedroom”,false);
newForm.setAnswer(“x-muc#roomconfig_registration”,false);
newForm.setAnswer(“muc#roomconfig_persistentroom”,true); //IF I SET THIS TO FALSE, I GET THE 404.
newForm.setAnswer(“muc#roomconfig_enablelogging”,true);
// newForm.setAnswer(“muc#roomconfig_maxstanzas”,100);
muc.sendConfigurationForm(newForm);
muc.join(user);
if(muc != null)
{
//muc.addMessageListener(messageListener);
}
}

``

Any ideas?

TIA!

Hey gforty,

Which server and version are you using for your test? If you are using Wildfire have you checked the error log file?

Regards,

– Gato

Gato,

thanks for the response.

I am using Wildfire 3.1.1.

My logs are empty.

If I create the room using

newForm.setAnswer(“muc#roomconfig_persistentroom”,true);

the room is created successfully. The user connection that created it can join.

I get the 404 when a different user attempts to join this room.

If I create the room by only changing the line above to

newForm.setAnswer(“muc#roomconfig_persistentroom”,false);

the room is created successfully and any user can join.(no problems)

Not sure why this is happening.

Thanks again.

Cheers, gforty