powered by Jive Software

java.lang.IllegalStateException: Not connected to server

I am developing chatting application in android with openfire server & ***asmack.jar . ******i am trying to implement groupchat . I am getting folloing error java.lang.IllegalStateException: Not connected to server ***

below is logcat

07-26 11:42:15.644: E/AndroidRuntime(16763): Caused by: java.lang.IllegalStateException: Not connected to server.

07-26 11:42:15.644: E/AndroidRuntime(16763): at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:492)

07-26 11:42:15.644: E/AndroidRuntime(16763): at org.jivesoftware.smackx.ServiceDiscoveryManager.discoverItems(ServiceDiscoveryM anager.java:600)

07-26 11:42:15.644: E/AndroidRuntime(16763): at org.jivesoftware.smackx.ServiceDiscoveryManager.discoverItems(ServiceDiscoveryM anager.java:573)

07-26 11:42:15.644: E/AndroidRuntime(16763): at org.jivesoftware.smackx.muc.MultiUserChat.getHostedRooms(MultiUserChat.java:293 )

07-26 11:42:15.644: E/AndroidRuntime(16763): at com.Mobileapp.milifestyle.chat.GroupFragment.getGroups(GroupFragment.java:117)

07-26 11:42:15.644: E/AndroidRuntime(16763): at com.Mobileapp.milifestyle.chat.GroupFragment.onStart(GroupFragment.java:69)