Skip navigation
This discussion is archived
2494 Views 5 Replies Latest reply: Aug 30, 2003 6:41 AM by dan RSS
Calculating status... 4 posts since
Aug 28, 2003
Currently Being Moderated

Aug 28, 2003 11:07 AM

reconnect to groupchat

Hi,

 

I''m having this problem, not sure if it''s smack, muc or my code but maybe you can help.

I''m using smack 1.1.1.

In my group chat applet (jre-1.3.1) I''m connecting to a group chat and all is ok the first time...joining, writing, messagelistener, participantslistener

After closing the window when I try joining the room again it gives me an error:

org.jivesoftware.smack.XMPPException: No response from server.

at org.jivesoftware.smack.GroupChat.join(GroupChat.java:184)

at org.jivesoftware.smack.GroupChat.join(GroupChat.java:148)

at ro.dc2.client.ui.ChatRoom.<init>(ChatRoom.java:38)

at ro.dc2.client.ui.DC2.createNewRoom(DC2.java:185)

 

Here is a bit of the code from chat room:

          myGroupChat=DC2Connection.conn.createGroupChat(roomName"@"DC2.CONFERENCE_SERVER);

          try {

               if (myGroupChat!=null &&  DC2Connection.conn.isConnected() && DC2Connection.conn.isAuthenticated()) {

                    myGroupChat.join(myName);

               }

          } catch (XMPPException ex) {

               System.out.println("Cannot join room "+roomName);

 

DC2Connection is a singleton which handles the connection and it is not destroyed when closing the applet the first time.

 

Any ideea?

    • Matt Tucker Jiver 3,191 posts since
      Jun 28, 2001
      Currently Being Moderated
      Aug 28, 2003 12:34 PM (in response to dan)
      Re: reconnect to groupchat

      Dan,

       

      I''d suggest turning on Smack debug and looking at the packets to see what is going wrong. You could also try a different server just to see if it''s some sort of server problem. Jabber.org has a public XMPP server that lets you creates groupchat rooms, for example.

       

      Regards,

      Matt

More Like This

  • Retrieving data ...

Bookmarked By (0)