powered by Jive Software

connection.getAccountManager().supportsAccountCreation() can''s work

my jabber server is openim, and my jabber client is gaim,

gaim can create account correctly.

but when i use smack lib to create account , then failure,

the debug info is following:

client info:

<stream:stream to=“” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams”>


server info:

<?xml version=''1.0'' encoding=''UTF-8'' ?>

<stream:stream xmlns:stream=’‘http://etherx.jabber.org/streams’’ id=’‘1064372670179’’ xmlns=’‘jabber:client’’ from=’‘’’ version=’‘1.0’’>

maybe openim has some bug? openim have no response for client request?

but openim is support create account, if i comment some code at createAount method in AccountManager class

if (!supportsAccountCreation()) {

throw new XMPPException(“Server does not support account creation.”);


i suggest remove the check supportaccountCreation code form createAccount method, because smack has public supportaccountcreation api,

my english is poor, if u cant understant my words, sorry for it,thx


I see no reply in your log from the server to the IQ “get” for registration info. Did you leave this out, or is it simply not there? If it’‘s not there, then that sounds like a server bug. The only thing the supportsAccountCreation method does is check to make sure that the reply to the iq get for account creation information was’'t an error and that it came.




thanks u reply so soon.

i think smack lib is not very good compatible with other jabber servers, but it is work very good for jive messager server.

i read some smack source code, when i invoke smack lib to communicate with openim server, the connection is alwalys close, because openim server is not compatible with smack lib, for examples:

i want to get account attributes

my code is follwing:


XMPPConnection.DEBUG_ENABLED = true;

String jabberServer = “”;

String port = “5222”;

connection = new XMPPConnection(jabberserver,Integer.parseInt(port));


java.util.Iterator iterator = connection.getAccountManager().getAccountAttributes();

}catch(Exception me){



client debug info:


openim server not response the correctly info,

may i can use smack lib to develope a common IM Client?

Best Regards!


Message was edited by: lovehouse

From the XML, the stream is addressed to the IP address. XMPPConnection() should be given the Jabber server hostname, and not the IP address.

Now it’‘s possible that you don’'t have a DNS address for your Jabber server. Since that was my case too, I wrote my own SSLXMPPConnection subclass (in the other forum thread) that allows you to separately specify the socket-level hostname from the XMPP-level.

I guess the Smack developers should support that for the non-SSL XMPPConnection.

hello mparaz,

why must given the jabber server only hostname, i think jabber server get correct ip address can run correctly.

because if gaim as my jabber client, i send ip address to jabber server, and openim jabber server work correctly?



I have no idea why the OpenIM server doesn’‘t reply to the IQ get for account information. I believe that it should according to the register spec and I don’'t see anything wrong with the packet. Therefore, I can only assume this is a server bug.



From the XML, the stream is addressed to the IP

address. XMPPConnection() should be given the Jabber

server hostname, and not the IP address.

Depending on the server, it’‘s actually possible that the IP address could work fine (if the server is configured so that it’‘s name is the IP address). However, I know what you’'re referring to in general and I think the solution is to use the server name for future packets that the server replies with after the connection open.



thx u very much,

it is a bug for opemim server,