fix for NPE in SASLMechanism.java
3.1.1 is not yet released. So, you can only try to build it fro the sources yourself.
Where I can get 3.1.1 version? I expreience this problem on server jabber.ru.
I fixed it with my own patch, because working directly with the XMPPConnection#writer conflict with further development with other connection types (like http-bind ).
Fixed for trunk version on revision 11256.
This Patch was commited to the community patch repository