Greetings
Is there something changed with the Smack debug window ?
Using a connection.DEBUG_ENABLED = true; gives a nullpointer exception.
-Rajesh
Greetings
Is there something changed with the Smack debug window ?
Using a connection.DEBUG_ENABLED = true; gives a nullpointer exception.
-Rajesh
Rajesh,
Is there something changed with the Smack debug
window ?
What version or daily build of Smack are you using? As far as I can remember the debugger hasn’'t changed in the last week or so.
Using a connection.DEBUG_ENABLED = true; gives a
nullpointer exception.
Could you paste a stack trace so I can see what’'s going on?
Thanks,
– Gato
Dear Gato
I have observed this on the 21st Jan 2004 build.
XMPPConnection connection = new XMPPConnection("jabber.org",5222);
connection.DEBUG_ENABLED = true;
The above code gives
java.lang.NullPointerException
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:340)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:238)
at Fr.sup(Fr.java:19)
at Fr.main(Fr.java:11)
If I change the code to login before enabling debug I do not see the Debug Window and there is no exception thrown.
XMPPConnection connection = new XMPPConnection("jabber.org",5222);
connection.login(user,pass);
connection.DEBUG_ENABLED = true;
FYI: the debug window is shown if debug parameter is passed while running java commandline
-Rajesh
Rajesh,
The correct way to open a debug window is to set the DEBUG_ENABLED before you create a new connection.
XMPPConnection.DEBUG_ENABLED = true;
XMPPConnection connection = new XMPPConnection("jabber.org",5222);
Anyway, I’'ll modify the code to avoid the NPE.
Thanks,
– Gato