The MUC configuration 'muc#roomconfig_roomowners' is not supported by the MUC service

237 Views Asked by At

I am working with xmpp and I want to create group chat. When I try to create group using the code below, I get the following error:

The MUC configuration 'muc#roomconfig_roomowners' is not supported by the MUC service'.

Why do I get this error? Can anyone help me solve it?

Here is my code:

public void createGroupChat() {

    MultiUserChatManager manager = MultiUserChatManager.getInstanceFor(connection);
    try {
        EntityBareJid jid = JidCreate.entityBareFrom([email protected]);

        MultiUserChat muc = manager.getMultiUserChat(jid);

        Set<Jid> owners = JidUtil.jidSetFrom(new String[]{"abc@servicename", "xyz@servicename"});

        Resourcepart nickname = Resourcepart.from("nickname");
        muc.create(nickname).getConfigFormManager().setRoomOwners(owners).submitConfigurationForm();

    } catch (XmppStringprepException e) {
        e.printStackTrace();
    } catch (MultiUserChatException.MucAlreadyJoinedException e) {
        e.printStackTrace();
    } catch (InterruptedException e) {
        e.printStackTrace();
    } catch (XMPPException.XMPPErrorException e) {
        e.printStackTrace();
    } catch (MultiUserChatException.MissingMucCreationAcknowledgeException e) {
        e.printStackTrace();
    } catch (NotConnectedException e) {
        e.printStackTrace();
    } catch (SmackException.NoResponseException e) {
        e.printStackTrace();
    } catch (MultiUserChatException.NotAMucServiceException e) {
        e.printStackTrace();
    } catch (MultiUserChatException.MucConfigurationNotSupportedException e) {
        e.printStackTrace();
    }
}

`

1

There are 1 best solutions below

1
On

Why do I get this error?

Probably because the MUC service does not support the configuration option.

Can anyone help me solve it?

By switching to a MUC service implementation which supports the option.