Strange behavior when sending IQ or publishing and item on a node using an object whose class is not known by the session

Issue #82 closed
jjoannes created an issue

That's a mistake of course, but the action fails silently and the session is disconnected (quite surprising!). No trace in the log, no exception either (even RunTime).

Is it possible to add a better handling of such case for, at least, let the user know which type of mistake it did?

Comments (7)

  1. Christian Schudt repo owner

    You probably don't have com.alu.ice.xmpp.babbler.FtrIqGet registered as extension.

    XmppSessionConfiguration configuration = XmppSessionConfiguration.builder()
        .extensions(Extension.of(FtrIqGet.class))
        .build();
    

    See http://sco0ter.bitbucket.org/babbler/customextensions.html

    I know that you miss the exception. This is a) because it's asynchronous and b) people complained that exceptions are logged (they wanted control over what to do with exceptions).

    Well if you don't get a response to your query, what else is the expected behavior? MarshalException instead?

  2. jjoannes reporter

    Yes, I know that I didn't register the class. But I would have expected a ExecutionException when calling the query(iq).get() with a JAXBException as the cause. Does that make sense?

  3. Christian Schudt repo owner

    Immediately complete (IQ-)queries if sending failed and don't wait on the timeout.

    If the requesting IQ could not be sent, e.g. due to marshal error, immediately complete the future with the exception. Don't wait on the timeout.

    Fixes issue #82

    → <<cset f36180fb2866>>

  4. Christian Schudt repo owner

    Immediately complete (IQ-)queries if sending failed and don't wait on the timeout.

    If the requesting IQ could not be sent, e.g. due to marshal error, immediately complete the future with the exception. Don't wait on the timeout.

    Fixes issue #82

    → <<cset 9fb7ce92e26a>>

  5. Log in to comment