Hi,
I'm using Smack 4.0.5 in a java stand alone client for calling a remote xmpp server.
It seems that Smack doesn't like an empty <node/> element sent by the server. Please check the following server message and the consequent Smack Exception:
<iq type="result" id="agsXMPP_8" to="admin-l-b0b@lxrt2-newbingo-as01.lottomatica.net/CAT">
<command xmlns="http://jabber.org/protocol/commands" sessionid="2ykD1043j47e7H1" node="http://bossmedia.com/protocol/bingo-admin#create-muc-room" status="completed">
<note/>
<x xmlns="jabber:x:data" type="result">
<reported>
<field var="room_jid" type="text-single" label="Room JID"/>
</reported>
<item>
<field var="room_jid">
<value>testgioid@msg01.lxrt2-newbingo-as01.lottomatica.net</value>
</field>
</item>
</x>
</command>
</iq>
java.lang.NullPointerException: Name is null
at java.lang.Enum.valueOf(Enum.java:235)
at org.jivesoftware.smackx.commands.AdHocCommandNote$Type.valueOf(AdHocCommandNote .java:62)
at org.jivesoftware.smackx.commands.provider.AdHocCommandDataProvider.parseIQ(AdHo cCommandDataProvider.java:99)
at org.jivesoftware.smack.util.PacketParserUtils.parseIQ(PacketParserUtils.java:46 3)
at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:174)
at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)
at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)
If I force the server to send something inside the <node> element, everything works well. E.g.:
<iq type="result" id="agsXMPP_8" to="admin-l-b0b@lxrt2-newbingo-as01.lottomatica.net/CAT">
<command xmlns="http://jabber.org/protocol/commands" sessionid="2ykD1043j47e7H1" node="http://bossmedia.com/protocol/bingo-admin#create-muc-room" status="completed">
<note type="info">Don't look at me</note>
<x xmlns="jabber:x:data" type="result">
<reported>
<field var="room_jid" type="text-single" label="Room JID"/>
</reported>
<item>
<field var="room_jid">
<value>testgioid@msg01.lxrt2-newbingo-as01.lottomatica.net</value>
</field>
</item>
</x>
</command>
</iq>
I've searched the documentation for this <note> element and I've found this: XEP-0050: Ad-Hoc Commands
It seems that an empty <note/> should be allowed.
Could it be a Smack bug?
Thanks
John