powered by Jive Software

Smack droping xmpp connection if not able to pair xml with Java Bean

I’‘m not sure if this is problem or “feature” by design. It looks to me in general that XMPP as protocol likes to drop connection every time it doesn’'t know what to do.

I have custom IQ packet. It extends IQ, and everything works fine. Still there is one little nag. It happens when things are not ok. Basically when Smack is parsing XML and trying to pair through reflection XML tags with Java Bean setters, if coding is done wrong, and there is no pair, instead just ignoring whole package, which looks right to me, Smack is dropping down whole xmpp connection.

I’'m wondering why implementation is done this way. Anybody who can shed some light on this.


Hey Miroslav,

The reason why the connection is being closed is that a Java exception occured while parsing the XML. Since the parser will remain in an unexpected state we need to close the connection. Anyway, this is a problem in the code that needs to be fixed so this problem shouldn’'t occur under normal circumstances.


– Gato