Simple connection - login problem

hi,

i want to create a simple connection to jabber.org server via smack.

here you can find my sourcecode and the error message.

http://nopaste.php-q.net/278437

i get the following error message:

Exception in thread “main” java.lang.IllegalStateException: Not connected to server.

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:380)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:351)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:332)

at Test2.main(Test2.java:12)

thanks

aaron

Hi Aaron,

On more recent versions of Smack you need to call the XMPPConnection#connect method prior to calling the XMPPConnection#login method.

Hope that helps,

Ryan

thanks ryang !