Kutzi,
I am using smack 4.0.5 in my project, and tested jars of version 4.0.6-SNAPSHOT and worked.
But, using openfire is required to disable the security in code, because I dont know how to disable security in openfire 3.9.3
Example works fine.
ConnectionConfiguration config = new ConnectionConfiguration ("localhost");
config.setSecurityMode (SecurityMode.disabled);
XMPPConnection con = new XMPPTCPConnection (config);
con.connect();
Anyone have an example of how to generate and import certificate in openfire or other xmpp server and a code sample using SSL and Smack?
The code and exception:
XMPPConnection con = new XMPPTCPConnection ("localhost");
con.connect();
WARNING: Exception while resovling SRV records for localhost. Consider adding '_xmpp-(server|client)._tcp' DNS SRV Records
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Nov 23, 2014 10:40:05 PM org.jivesoftware.smack.tcp.PacketWriter writePackets
WARNING: Exception writing closing stream element
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:121)
at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at java.io.BufferedWriter.flush(BufferedWriter.java:254)
at org.jivesoftware.smack.tcp.PacketWriter.writePackets(PacketWriter.java:190)
at org.jivesoftware.smack.tcp.PacketWriter.access$000(PacketWriter.java:40)
at org.jivesoftware.smack.tcp.PacketWriter$1.run(PacketWriter.java:77)
Thanks.
What are the previous and current version of the jabber-plugin (the plugin doesn't get automatically updated if Jenkins is)?
Is _xmpp-client._tcp.jabber.peykasa.ir the correct name of your Jabber server? What happens if you try to resolve the name (i.e. nslookup) from the shell on the Jenkins host?