powered by Jive Software

Smack 4.0 and openfire

Hello! Can someone help me making a basic connection to Openfire server using the lastest smack4.0. I was following the snipets from the documentation but failed. thanks in advance.

Did you see https://community.igniterealtime.org/thread/52347 ?

Thanks for your answer, I was looking at the wrong documentation. Did fix everything but an error in connection.login() line. It says: “The type javax.security.sasl.SaslException cannot be resolved. It is indirectly referenced from required .class files”. Im stuck at this point. |Any idea?


ConnectionConfiguration config = new ConnectionConfiguration(“”,5222);

XMPPConnection connection = new XMPPTCPConnection(config);

connection.connect(); // This line has an error.



catch (SmackException e) {



catch (java.io.IOException e)




catch (XMPPException e) {



Are you on Android?


Saw your reply from this post https://community.igniterealtime.org/thread/52833 will try aSmack

Add your server name like this:

ConnectionConfiguration config = new ConnectionConfiguration(“”,5222,“yourDomain.org”);