powered by Jive Software

NullPointerException during login

Hi, I just started exploring Smack 3.1 and I’m already stuck in the getting started part…

XMPPConnection con = new XMPPConnection("jabber.org");
con.login("[user]", "[password]"); // placeholders, tested with working account

during login I get this:

at org.jivesoftware.smack.util.Base64.encodeBytes(Base64.java:636)
at org.jivesoftware.smack.sasl.SASLMechanism.challengeReceived(SASLMechanism.java: 152)
at org.jivesoftware.smack.SASLAuthentication.challengeReceived(SASLAuthentication. java:492)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:338)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:76)

I did not try another server yet, but it’s supposed to work with jabber.org, right?

I think this should be related to SMACK-264, see Smack - fix for NPE in SASLMechanism.java and Can’t connect to XMPP server in Smack 3.1.0 beta release.

Thanks, made that little change in SASLMechanism and now everything works perfectly!