powered by Jive Software

Oracle RTC Connection error

Have anyone made an attempt on using Smack 3.0.4 to connect to Orace RTC? I’ve connected to this server by using Oracle Messenger using port 443 ssl and Pidgin port 5223 ssl

Here is what I’ve tried so far…

Created a DummySSLSocketFactory and a DummyTrustManager to bypass any cert validation issues.

I’ve tried both SSL and TLS portocols and both port 443 and 5223.

Here is my connection code…

ConnectionConfiguration config = new ConnectionConfiguration(“oraclertchost”, 5223);

config.setSocketFactory(new DummySSLSocketFactory());

XMPPConnection con = new NICXMPPConnection(config);

con.connect();

con.login(“user@somehost”, “password”);

When I try to connect, I get a stack trace like…

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

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

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

Exception in thread “main” No response from the server.:

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

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

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

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

at us.achievewith.transponder.MyTest.main(MyTest.java:44)

Debug

<iq id=“xlyNP-0” type=“get”>

<query xmlns=“jabber:iq:auth”>

<username>someuser</username>

</query>

</iq>


<presence id=“xlyNP-1” type=“unavailable”/>

Raw Sent

<stream:stream to=“host” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

<iq id=“xlyNP-0” type=“get”><query xmlns=“jabber:iq:auth”><username>user</username></query>&l t;/iq>

<presence id=“xlyNP-1” type=“unavailable”></presence>

</stream:stream>

<stream:stream to=“host” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

Raw Received

<stream:stream from=‘host’ xmlns=‘jabber:client’ id=‘1FBC00001A22’ xmlns:stream=‘http://etherx.jabber.org/streams’>

<stream:error>Connection is closing</stream:error></stream:stream>

<stream:stream from=‘host’ xmlns=‘jabber:client’ id=‘1FE4000014C0’ xmlns:stream=‘http://etherx.jabber.org/streams’>

Please advise, thank you.

Okay found the solution, thanks to Steve who reply my email and posted this message few weeks ago http://www.igniterealtime.org/community/message/160300#160300

For old ssl port 5223 connection you’ll need to set your configuration to the following

ConnectionConfiguration connConfig = new ConnectionConfiguration(host, port, domain);

connConfig.setSASLAuthenticationEnabled(false);

connConfig.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);

connConfig.setSocketFactory(new DummySSLSocketFactory());

XMPPConnection connection = new XMPPConnection(connConfig);

I’ve tested this on Oracle OCS and it IM me the message I want so is working pretty good.

Sai