powered by Jive Software

Error while getting a connection to wildfire on linux

Hi

I am using SMACK api with wildfire as my server. I have installed wildfire on linux and am facing issues while getting a connection to wildfire.

When I execute the code below:

ConnectionManager conMnger = new ConnectionManager();

con = conMnger.getConnection(userName, password, “abc”);

I incosistantly get the errors:

java.net.SocketException: Socket closed

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)

at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)

at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)

at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)

at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)

at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)

at java.io.BufferedWriter.flush(BufferedWriter.java:236)

at org.jivesoftware.smack.util.ObservableWriter.flush(ObservableWriter.java:48)

at org.jivesoftware.smack.PacketWriter.writePackets(PacketWriter.java:242)

at org.jivesoftware.smack.PacketWriter.access$000(PacketWriter.java:36)

at org.jivesoftware.smack.PacketWriter$1.run(PacketWriter.java:70)

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(InputRecord.java:5 01)

at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:343)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:720)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImp l.java:1025)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:10 38)

at org.jivesoftware.smack.XMPPConnection.proceedTLSReceived(XMPPConnection.java:11 18)

at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:322)

at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:43)

at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:63)

java.lang.IllegalStateException: Not connected to server.

at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:699)

at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication .java:54)

at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 213)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:426)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:389)

Please let me know what the issue might be. Im in a desperate situation !

Thanks in advance

Oops looks like I pasted the wrong code embarrassed smile

I am connecting using

XMPPConnection con = new XMPPConnection(“myChatServer”, “5222”, “resource”);

Thanks and sorry for wasting any ones time.