powered by Jive Software

DNS SRV record resolving throws unexpected Exception

I noticed a change in behavior between 4.1 and the 4.2-rc2 with regard of DNS resolving.

We are developing a desktop client, so using the javax resolver. In case when no DNS is set up or used, in the 4.2 version you will get a exception:

Caused by: javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name ‘_xmpp-client._tcp.mlink.xmpp.test’

at org.jivesoftware.smack.util.dns.javax.JavaxResolver.lookupSRVRecords0(JavaxReso lver.java:86)

at org.jivesoftware.smack.util.dns.DNSResolver.lookupSRVRecords(DNSResolver.java:4 5)

while in the past, with 4.1, only a warning was displayed, with a fall back on using the servicename as a hostname and resolving this address.

I have seen that the exception handling of the DNS SRV resolve explicitly is removed, so I would like to ask, what is the ratio and could it been reverted or improved?

A great improvement would be capturing the resolve-naming-Exceptions in a specific smack exception and throw this on the failed connect.

That’s a leftover from the DNSSEC introduction. Please try the latest 4.2.0-rc3-SNAPSHOT and report back if it fixes the issue. Thank you.

The latest Snapshot from Sonatype works as I would have imagined it myself.