powered by Jive Software

Google talk Client

Hi,

I used ‘smack_3_2_2’ jar for writting java code, for MessageListener and MessageReceiver.

But when i try to run MessageListener for checking the connection has been made or not.

I get following error ::

XMPPError connecting to talk.google.com:5222.: remote-server-error(502) XMPPError connecting to talk.google.com:5222.

  • – caused by: java.net.ConnectException: Connection timed out: connect*

  • at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection. java:524)*

  • at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:953)*

  • at otn.adf.googletalk.MessageListener.main(MessageListener.java:94)*

*Nested Exception: *

java.net.ConnectException: Connection timed out: connect

  • at java.net.PlainSocketImpl.socketConnect(Native Method)*

  • at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)*

Failed to connect to talk.google.com

  • at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)*

  • at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)*

  • at java.net.Socket.connect(Socket.java:529)*

  • at java.net.Socket.connect(Socket.java:478)*

Can anyone please help.

I am using following code :

  •    ConnectionConfiguration connConfig = new ConnectionConfiguration("talk.google.com", 5222, "gmail.com");*
    
  •    XMPPConnection connection = new XMPPConnection(connConfig);*
    
  •    connection.connect();*
    

but it gives the above mentioned error at ‘connection.connect()’.
I also tried ConnectionConfuguration as : * ConnectionConfiguration connConfig = new ConnectionConfiguration(“talk.google.com”, 5222, “googlemail.com”);*

but it again gives the same user.

Please anyone who can help…!!

Thanks in advance

Regards,

newUser.