Hi,
 
I am using smack 2.1.0 Client API to connect to jabber.org (ejabberd).
 
Below is the function to delete the user:
 
public void deleteUser()
{
   XMPPConnection.DEBUG_ENABLED = true;
   XMPPConnection l_xmmpConnection = null;
  
   try
   {
      PrintLog("Delete user.");

      l_xmmpConnection = new XMPPConnection("noneworkstation", 5222);
      l_xmmpConnection.addPacketListener(this, new PacketTypeFilter(Message.class));
      l_xmmpConnection.login("tancy", "tancy");
      AccountManager l_accountManager = l_xmmpConnection.getAccountManager();
      l_accountManager.deleteAccount();
  
      PrintLog("User is deleted.");
   }
   catch (Exception ex)
   {
      PrintLog("Exception in deleteUser: " + ex.toString());
   }
 
  l_xmmpConnection.close();
}
 
 
After I ran, I got:

E:\Jabber\API\Smack 2.1.0\code>java -classpath ../smack.jar;../smackx.jar;./ Test
[01:23:39 AM] Delete user.
[01:23:53 AM] Exception in deleteUser: No response from server.:

I tried to run above function several times. Sometimes with above exception, the
user is deleted.
 
How come ? Is it a bug in ejabberd or I did wrong in the code ?
 
Your help is really appreciated.
 
Thanks !
 
Tan


Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.

Reply via email to