powered by Jive Software

AccountManager.getAccountAttributes() returns empty Iterator

The “AccountManager.getAccountAttributes()” call always returns an empty Iterator. Is this something that is not implemented in Smack and/or my server.

I’'m using the JiveMessenger server version 1.1.


Brian McNamara


Jive Messenger has three attributes: username, password and email. The class AccountManager allows you to get/set the first two attributes. Off the top of my head, I’'m not sure if top Messenger is sending the email attribute. Messenger uses a data form to send any other attribute to the client such us: username, name, email, password, x-nameVisible and x-emailVisible.

So you have two options in order to handle the registration attributes:

  1. Use the attributes defined in AccountManager though the getters/setters and #getAccountAttributes()

  2. Get the form that the server sent together with the registration (if any). The dataform is used by the servers in order to provide more attributes than the ones defined in the XMPP spec. Use Form.getFormFrom(Packet) to get the dataform within the Registration packet.


– Gato


From my experience (using the jabberd 1.4 server as a test), AccountManager.getAttributes() doesn’'t return attributes that the server sent as empty tags.

For example, when the server is configed as:

Choose a username and password to register with this server.


Choose a username and password to register with this server.

AccountManage doesn’'t return the email attribute. However if the tag isnt empty, even if it just contains a single space, such as:

Choose a username and password to register with this server.

Then AccountManager.getAttributes() will return

the account attribute. Maybe AccountManager.getAttributes() should be modified so it returns attributes that the sever sent as empty tags?


Which version of Smack are you using? Try using the latest daily build which already has a fix for the problem that you are seeing.


– Gato

Was using the standard 1.4.0 release - have just d/l the latest build, cheers.