Parser got END_DOCUMENT event. This could happen e.g. if the server closed the connection without sending a closing stream element

Hi,
I am getting this exception when conneting with ejabbered server having SSL enabled:
Connection XMPPTCPConnection[not-authenticated] (0) closed with error
org.jivesoftware.smack.SmackException$SmackMessageException: Parser got END_DOCUMENT event. This could happen e.g. if the server closed the connection without sending a closing stream element.

But this is working working fine if we don’t use SSL at our ejabbered server.

Please help me out as we have to use with SSL.

Thanks and Regards
Firoz Saifi