In Smack 4.2.0, I am not able to access the setXmppDomain methods or the setInetAddress method of XMPPTCPConnectionConfiguration.Builder. In the former case, the code compiles correctly but fails on execution with the error:
java.lang.NoSuchMethodError: org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration$Builder.setXmppDomain (Ljava/lang/String;)Lorg/jivesoftware/smack/ConnectionConfiguration$Builder;
Unfortunately I think this makes it impossible to use a custom configuration with XMPP TCP Connections? I have checked via reflection during execution and indeed the returned builder class does not include the setXmppDomain methods. It seems to be a different class or different version than indicated in the source? Could this be a JAR/packaging problem or problem with Maven/repository?
In trying to access the setInetAddress method, I get a different runtime exception (again, compiling is fine):
My application is deployed as an EAR. This is my Gradle configuration:
(Side note: I have no idea why this pasted as a table?)
This is my code:
|// Create our configuration|
|XMPPTCPConnectionConfiguration.Builder configurationBuilder = XMPPTCPConnectionConfiguration.builder();|
|configurationBuilder.setXmppDomain(messagingServerHost); // <------- Fails with method not found|
configurationBuilder.setSecurityMode(ConnectionConfiguration.SecurityMode.disabl ed); // XMPP server is on same host as app
|// Create configuration|
|XMPPTCPConnectionConfiguration conf = configurationBuilder.build();|
The messagingServerHost is a string with the domain.
I have also tried using a bare JID domain, etc., but none of the methods seem to allow me to set the address of the XMPP server, which makes it seemingly impossible to use the custom configuration? Any help is appreciated, thanks!!