Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] Problem to connect gtalk account with ChatRobotApplication

Hi ECF people,

I'm learning ECF and now I'm trying to use ChatRobotApplication.

I've change the the launcher args to this: c4bizconsulting@xxxxxxxxxxxxxx xxxxxxxx cvgaviao@xxxxxxxxx Hi, ECF Robot is sending you a message

But I'm getting this error :

!ENTRY org.eclipse.osgi 4 0 2011-07-27 08:34:52.235
!MESSAGE Application error
!STACK 1
org.eclipse.ecf.core.ContainerConnectException: Login attempt failed
at org.eclipse.ecf.internal.provider.xmpp.smack.ECFConnection.connect(ECFConnection.java:249) at org.eclipse.ecf.provider.generic.ClientSOContainer.connect(ClientSOContainer.java:145) at org.eclipse.ecf.provider.xmpp.XMPPContainer.connect(XMPPContainer.java:218) at org.eclipse.ecf.example.clients.XMPPChatClient.doConnect(XMPPChatClient.java:102) at org.eclipse.ecf.example.clients.XMPPChatClient.connect(XMPPChatClient.java:95) at org.eclipse.ecf.example.clients.applications.ChatRobotApplication.start(ChatRobotApplication.java:53) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: SASL authentication failed using mechanism PLAIN:
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:325)
    at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:395)
at org.eclipse.ecf.internal.provider.xmpp.smack.ECFConnection.connect(ECFConnection.java:244)
    ... 18 more


I've created a little plugin to test the connection using the bundle org.jivesoftware.smack from ECF source and I'm connecting successfully with this code:

    public void start(BundleContext context) throws Exception {
        System.out.println("Hello World!!");

ConnectionConfiguration cc = new ConnectionConfiguration("talk.google.com", 5222, "gmail.com");
        XMPPConnection connection = new XMPPConnection(cc);
        try {
             connection.connect();

             // You have to put this code before you login
             SASLAuthentication.supportSASLMechanism("PLAIN", 0);

// You have to specify your gmail addres WITH @gmail.com at the end connection.login("c4bizconsulting@xxxxxxxxx", "xxxxxxxx", "resource");

             // See if you are authenticated
             System.out.println(connection.isAuthenticated());

        } catch (XMPPException e1) {
             e1.printStackTrace();
        }
    }

Am I missing something?

thanks for any tip

cheers

Cristiano





Back to the top