Hi, I am new to this, trying to create my a client app to connect to jabber.org and login, here is my code (pretty much from doc), I used the same username and password logged in using Pandion client successfully, I don’t know what I am missing here (by the way I can’t get the enhanced debugger to show up even if I included smackx-debug.jar in the classpath, only the lite one)? I also tried using ConnectionConfiguration same result.
thanks a lot!
XMPPConnection.DEBUG_ENABLED = true;
XMPPConnection connection = new XMPPConnection(“jabber.org”);
connection.connect();
System.err.println("==connected");
connection.login(“myusername”, “mypassword”);
System.err.println("==login");
ChatManager chatmanager = connection.getChatManager();
…
I got following exception:
==connected
java.lang.NullPointerException
at org.jivesoftware.smack.util.Base64.encodeBytes(Base64.java:636)
at org.jivesoftware.smack.sasl.SASLMechanism.challengeReceived(SASLMecha
nism.java:152)
at org.jivesoftware.smack.SASLAuthentication.challengeReceived(SASLAuthe
ntication.java:492)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:33
8)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:76)