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 element sent by the server. Please check the following server message and the consequent Smack Exception:
<command xmlns="[http://jabber.org/protocol/commands](http://jabber.org/protocol/commands)" sessionid="2ykD1043j47e7H1" node="[http://bossmedia.com/protocol/bingo-admin#create-muc-room](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>
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 element, everything works well. E.g.:
<command xmlns="[http://jabber.org/protocol/commands](http://jabber.org/protocol/commands)" sessionid="2ykD1043j47e7H1" node="[http://bossmedia.com/protocol/bingo-admin#create-muc-room](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>
I’ve searched the documentation for this element and I’ve found this: XEP-0050: Ad-Hoc Commands
It seems that an empty should be allowed.
Could it be a Smack bug?
Thanks
John