Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Communications Framework (ECF) » ECF Twitter Connection Error
ECF Twitter Connection Error [message #624668] Wed, 31 December 2008 13:46 Go to next message
Holger Staudacher is currently offline Holger StaudacherFriend
Messages: 166
Registered: July 2009
Senior Member
Hi all,
i tried to connect to twitter using Scotts ecf implementation for
twitter. But i got an error (see bellow). I debbugged the
TwitterContainer#connect method. All credentials are set correctly.
Here is my code:

IContainerFactory factory = ContainerFactory.getDefault();
IContainer container = factory.createContainer(
"ecf.twitter.twitter4j" );

IConnectContext context = getConnectionContext();

IIDFactory idFactory = IDFactory.getDefault();
ID targetId
= idFactory.createID( container.getConnectNamespace(), "USERNAME" );

container.connect( targetId, context );

The getConnectionContext Method creates an IConnectionContext and
implement the password for the given user in an ObjectCallbackHandler.

Any ideas? Thanks a lot for your help.

Regards, Holger

StackTrace:

Port 9278 already in use. This instance of R-OSGi is running on port 9279
org.eclipse.ecf.core.ContainerConnectException: Cound not authenticate
at
org.eclipse.ecf.provider.twitter.container.TwitterContainer. connect(TwitterContainer.java:203)
at

com.eclipesource.twitlyn.ContextUIStartup$1.taskActivated(Co ntextUIStartup.java:45)
at

org.eclipse.mylyn.internal.tasks.core.TaskActivityManager.ac tivateTask(TaskActivityManager.java:413)
at

org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateActi on.run(TaskActivateAction.java:48)
at

org.eclipse.mylyn.internal.tasks.ui.views.TaskListCellModifi er.toggleTaskActivation(TaskListCellModifier.java:130)
at

org.eclipse.mylyn.internal.tasks.ui.views.TaskListView$9.mou seDown(TaskListView.java:929)
at

org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:179)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2104)
at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve Method)
at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2599)
at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1326)
at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2929)
at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at

org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at

org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at

java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Re: ECF Twitter Connection Error [message #624669 is a reply to message #624668] Thu, 01 January 2009 17:55 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1038
Registered: July 2009
Senior Member
Hi Holger,

I've discovered that the version of twitter 4j we were previously using
(twitter4j 1.1.2) had a bug that caused twitter.verifyCredentials to
always fail.
http://groups.google.com/group/twitter4j/browse_thread/threa d/1b825c088faae4e7

This caused both of us to fail to authenticate.

I've updated the code on ecf1.osuosl.org to twitter4j 1.1.3, and now
it's able to connect properly.

Note you can send status updates by using the UI, or automated/without
UI using the IChatManager container adapter.

The ECF presence API messaging is not yet fully implemented (e.g.
replys), but I will work on it further (the provider) over the next few
days (Jan 1-3).

Thanks and happy tweeting.

Scott


Holger Staudacher wrote:
> Hi all,
> i tried to connect to twitter using Scotts ecf implementation for
> twitter. But i got an error (see bellow). I debbugged the
> TwitterContainer#connect method. All credentials are set correctly.
> Here is my code:
>
> IContainerFactory factory = ContainerFactory.getDefault();
> IContainer container = factory.createContainer(
> "ecf.twitter.twitter4j" );
>
> IConnectContext context = getConnectionContext();
>
> IIDFactory idFactory = IDFactory.getDefault();
> ID targetId
> = idFactory.createID( container.getConnectNamespace(),
> "USERNAME" );
>
> container.connect( targetId, context );
>
> The getConnectionContext Method creates an IConnectionContext and
> implement the password for the given user in an ObjectCallbackHandler.
>
> Any ideas? Thanks a lot for your help.
>
> Regards, Holger
>
> StackTrace:
>
> Port 9278 already in use. This instance of R-OSGi is running on port 9279
> org.eclipse.ecf.core.ContainerConnectException: Cound not authenticate
> at
> org.eclipse.ecf.provider.twitter.container.TwitterContainer. connect(TwitterContainer.java:203)
>
> at
> com.eclipesource.twitlyn.ContextUIStartup$1.taskActivated(Co ntextUIStartup.java:45)
>
> at
> org.eclipse.mylyn.internal.tasks.core.TaskActivityManager.ac tivateTask(TaskActivityManager.java:413)
>
> at
> org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateActi on.run(TaskActivateAction.java:48)
>
> at
> org.eclipse.mylyn.internal.tasks.ui.views.TaskListCellModifi er.toggleTaskActivation(TaskListCellModifier.java:130)
>
> at
> org.eclipse.mylyn.internal.tasks.ui.views.TaskListView$9.mou seDown(TaskListView.java:929)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:179)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
> at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
> at
> org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2104)
> at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
> at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
> at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve
> Method)
> at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2599)
> at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1326)
> at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2929)
> at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive
> Method)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> 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(EclipseS tarter.java:386)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at
> java.lang.reflect.Method.invoke(Method.java:585)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>
Re: ECF Twitter Connection Error [message #624670 is a reply to message #624669] Thu, 01 January 2009 22:09 Go to previous message
Holger Staudacher is currently offline Holger StaudacherFriend
Messages: 166
Registered: July 2009
Senior Member
Hi Scott,
it works great now. Thank you.

Holger

On 2009-01-01 18:55:10 +0100, Scott Lewis <slewis@composent.com> said:

> Hi Holger,
>
> I've discovered that the version of twitter 4j we were previously using
> (twitter4j 1.1.2) had a bug that caused twitter.verifyCredentials to
> always fail.
> http://groups.google.com/group/twitter4j/browse_thread/threa d/1b825c088faae4e7

This
>
> caused both of us to fail to authenticate.
>
> I've updated the code on ecf1.osuosl.org to twitter4j 1.1.3, and now
> it's able to connect properly.
>
> Note you can send status updates by using the UI, or automated/without
> UI using the IChatManager container adapter.
>
> The ECF presence API messaging is not yet fully implemented (e.g.
> replys), but I will work on it further (the provider) over the next few
> days (Jan 1-3).
>
> Thanks and happy tweeting.
>
> Scott
>
>
> Holger Staudacher wrote:
>> Hi all,
>> i tried to connect to twitter using Scotts ecf implementation for
>> twitter. But i got an error (see bellow). I debbugged the
>> TwitterContainer#connect method. All credentials are set correctly.
>> Here is my code:
>>
>> IContainerFactory factory = ContainerFactory.getDefault();
>> IContainer container = factory.createContainer(
>> "ecf.twitter.twitter4j" );
>>
>> IConnectContext context = getConnectionContext();
>>
>> IIDFactory idFactory = IDFactory.getDefault();
>> ID targetId
>> = idFactory.createID( container.getConnectNamespace(), "USERNAME" );
>>
>> container.connect( targetId, context );
>>
>> The getConnectionContext Method creates an IConnectionContext and
>> implement the password for the given user in an ObjectCallbackHandler.
>>
>> Any ideas? Thanks a lot for your help.
>>
>> Regards, Holger
>>
>> StackTrace:
>>
>> Port 9278 already in use. This instance of R-OSGi is running on port 9279
>> org.eclipse.ecf.core.ContainerConnectException: Cound not authenticate
>> at
>> org.eclipse.ecf.provider.twitter.container.TwitterContainer. connect(TwitterContainer.java:203)

>>
>> at
>> com.eclipesource.twitlyn.ContextUIStartup$1.taskActivated(Co ntextUIStartup.java:45)

>>
>> at
>> org.eclipse.mylyn.internal.tasks.core.TaskActivityManager.ac tivateTask(TaskActivityManager.java:413)

>>
>> at
>> org.eclipse.mylyn.internal.tasks.ui.actions.TaskActivateActi on.run(TaskActivateAction.java:48)

>>
>> at
>> org.eclipse.mylyn.internal.tasks.ui.views.TaskListCellModifi er.toggleTaskActivation(TaskListCellModifier.java:130)

>>
>> at
>> org.eclipse.mylyn.internal.tasks.ui.views.TaskListView$9.mou seDown(TaskListView.java:929)

>>
>> at
>> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:179)
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
>> at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1 360)
>> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3482)
>> at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java :3024)
>> at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.j ava:2104)
>> at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
>> at org.eclipse.swt.widgets.Display.controlProc(Display.java:862 )
>> at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Nati ve Method)
>> at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2599)
>> at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1326)
>> at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2929)
>> at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Na tive Method)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3051)
>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)

>>
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>> at
>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)

>>
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)

>>
>> 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(EclipseS tarter.java:386)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)

>>
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)

>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)

>>
>> at
>> java.lang.reflect.Method.invoke(Method.java:585)
>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
>> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Previous Topic:Babel
Next Topic:Provider for ISendFileTransferContainerAdapter
Goto Forum:
  


Current Time: Fri Apr 26 10:30:41 GMT 2024

Powered by FUDForum. Page generated in 0.02773 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top