0

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(myroom@conference.servicename);

        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();
    }
}

`

D G
  • 176
  • 1
  • 8

1 Answers1

0

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.

Flow
  • 23,572
  • 15
  • 99
  • 156
  • What is the meaning of 'By switching MUC service implimentation' ? Can you please explain me? because i m new to xmpp. i am using ejabberd . – D G Sep 24 '18 at 06:07