powered by Jive Software

Not able to join two different account to MUC room with same Resource name

Connection Code

config = XMPPTCPConnectionConfiguration.builder()
.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)
.setHostAddress(InetAddress.getByName("192.168.0.19")).setXmppDomain("domain")
.setResource(Resourcepart.from("chat"))
.setPort(5222);

Muc chat room joining code:

final MultiUserChatManager multiUserChatManager =
MultiUserChatManager.getInstanceFor(connection);
MultiUserChat multiUserChat = multiUserChatManager.getMultiUserChat(JidCreate.entityBareFrom("movie"@conference."+"domain"));
multiUserChat.join(Resourcepart.from("chat"));

When I run about code in two different device first user is able to join the room but second user not able to join. Getting exceptions as,
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPP error reply received from movie@conference.domain/chat: XMPPError: conflict - cancel
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smack.StanzaCollector.nextResultOrThrow(StanzaCollector.java:268)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:376)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:740)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smackx.muc.MultiUserChat.join(MultiUserChat.java:631)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at app.chat.MainActivity$1.authenticated(MainActivity.java:169)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smack.AbstractXMPPConnection.callConnectionAuthenticatedListener(AbstractXMPPConnection.java:1261)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smack.AbstractXMPPConnection.afterSuccessfulLogin(AbstractXMPPConnection.java:595)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smack.tcp.XMPPTCPConnection.afterSuccessfulLogin(XMPPTCPConnection.java:380)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smack.tcp.XMPPTCPConnection.loginInternal(XMPPTCPConnection.java:445)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smack.AbstractXMPPConnection.login(AbstractXMPPConnection.java:517)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at org.jivesoftware.smack.AbstractXMPPConnection.login(AbstractXMPPConnection.java:491)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at app.chat.MainActivity$2.doInBackground(MainActivity.java:212)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:295)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
11-06 18:58:52.620 18301-18327/app.chat W/System.err: at java.lang.Thread.run(Thread.java:818)