Greetings for the New Year,
I am trying to Login to XMPP Server by implementing the Smack API provided. But the following Error is thrown:
stream:error (username)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:320)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:63)
Unfortunately the javadocs for PacketReader Class is missing in the downloaded APIs.
How do i resolve the issue since the Code written is identical to the Smack examples.
Can anyone help me out with this. Thanks in advance.
M. Saquib
barata7
#2
Try this:
XMPPConnection x1 = new XMPPConnection(“thiago”);
x0.connect();
x0.login(“barata7”, “barata7”);
Thiago,
shouldn’'t the code be instead :
XMPPConnection x1 = new XMPPConnection(“thiago”);
x1.connect();
x1.login(“barata7”, “barata7”);
What I don’'t get is :
How come you don’'t specify with yr XMPP connection the IP / name of the Server … ?
Tx,
\T,
Guys,
The Application is working now. The following constructor resolved the issue:
XMPPConnection(String host, int port, String serviceName)
Thanks Anywayz.
M. Saquib
Message was edited by: msaquibkazi
The Issue is resolved after using the appropriate Constructor.