Hi.
I’'m using smack_3_0_0_beta2. This simple test case shows the problem:
XMPPConnection con = new XMPPConnection(“andres”);
con.connect();
con.loginAnonymously();
//creating chat, sending messages here works fine
con.disconnect();
result:
Exception in thread “main” java.lang.NullPointerException
at org.jivesoftware.smack.XMPPConnection.disconnect(XMPPConnection.java:636)
at org.jivesoftware.smack.XMPPConnection.disconnect(XMPPConnection.java:614)
I tried to get the source code for beta2 but couldn’'t find it…
Any ideas?
Hi Andres,
I made the following test case that worked:
org.jivesoftware.smack.ReconnectionTest class
public void testAnonymousDisconnection() throws Exception {
XMPPConnection con = new XMPPConnection(getHost());
con.connect();
con.loginAnonymously();
con.disconnect();
}
It passed.
You can find the last version of the source code of Smak at:
http://www.igniterealtime.org/downloads/source.jsp
or:
svn co http://svn.igniterealtime.org/svn/repos/smack/trunk smack
Let me know more details if the error continues.
Regards,
Francisco
Ok.
The problem is svn source is newer than the one used in smack_3_0_0_beta2 build.
I decompiled the XMPPConnection.class of smack_3_0_0_beta2. This is the result:
(…)
public void disconnect(Presence unavailablePresence)
{
shutdown(unavailablePresence);
roster.cleanup();
roster = null;
wasAuthenticated = false;
packetWriter.cleanup();
packetWriter = null;
packetReader.cleanup();
packetReader = null;
}
(…)
So… it would be nice if we could get a newer smack build with this new code…
Is there any new beta release planned soon? or should i build myself… (obviously i’'d prefer using an “official” build, even if it is a beta one)