Hi all,
I've managed to determine what caused my eclipse workspace to crash
when I wanted to add the jclouds core, the twitter module and their
dependencies to the jclouds-android Android application that I intend
to use as a demo of jclouds on Android. The problem was caused by
eclipse not having enough space to build the app and I solved it by
increasing the heap in eclipse.ini - see
http://code.google.com/p/jclouds-android/wiki/EclipseSetup.
However, it seems we're not out of the woods yet. The code I am
using to connect to twitter in order to try to get the tweets, and
which looks like this:
TwitterClient tc = TwitterContextFactory.createContext(user,
password).getApi();
tc.getMyMentions();
crashes with the following stack trace:
12-03 17:08:49.532: ERROR/AndroidRuntime(713):
com.google.inject.ProvisionException: Guice provision errors:
12-03 17:08:49.532: ERROR/AndroidRuntime(713): 1) Error in custom
provider, java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
org.jclouds.twitter.config.TwitterRestClientModule.provideAsyncClient
(Unknown Source)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
org.jclouds.twitter.config.TwitterRestClientModule.provideAsyncClient
(Unknown Source)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): while locating
org.jclouds.twitter.TwitterAsyncClient
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
org.jclouds.twitter.config.TwitterContextModule.provideContext(Unknown
Source)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
org.jclouds.twitter.config.TwitterContextModule.provideContext(Unknown
Source)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): while locating
org.jclouds.rest.RestContext<org.jclouds.twitter.TwitterAsyncClient,
org.jclouds.twitter.TwitterClient>
12-03 17:08:49.532: ERROR/AndroidRuntime(713): 1 error
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:770)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:
792)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
org.jclouds.rest.RestContextBuilder.buildContext
(RestContextBuilder.java:193)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
org.jclouds.twitter.TwitterContextFactory.createContext
(TwitterContextFactory.java:52)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.googlecode.jcloudsandroid.CloudTweet$1.onClick(CloudTweet.java:31)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.View.performClick(View.java:2179)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.View.onTouchEvent(View.java:3828)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.widget.TextView.onTouchEvent(TextView.java:6291)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.View.dispatchTouchEvent(View.java:3368)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1197)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.app.Activity.dispatchTouchEvent(Activity.java:1993)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1525)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.os.Handler.dispatchMessage(Handler.java:99)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.os.Looper.loop(Looper.java:123)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
android.app.ActivityThread.main(ActivityThread.java:3948)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
java.lang.reflect.Method.invokeNative(Native Method)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
java.lang.reflect.Method.invoke(Method.java:521)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
dalvik.system.NativeStart.main(Native Method)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): Caused by:
java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:106)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InternalFactoryToProviderAdapter.get
(InternalFactoryToProviderAdapter.java:40)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call
(ProviderToInternalFactoryAdapter.java:43)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InjectorImpl.callInContext
(InjectorImpl.java:814)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.ProviderToInternalFactoryAdapter.get
(ProviderToInternalFactoryAdapter.java:40)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.Scopes$1$1.get(Scopes.java:63)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InternalFactoryToProviderAdapter.get
(InternalFactoryToProviderAdapter.java:40)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:
761)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InjectorImpl.callInContext
(InjectorImpl.java:814)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:757)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:95)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InternalFactoryToProviderAdapter.get
(InternalFactoryToProviderAdapter.java:40)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call
(ProviderToInternalFactoryAdapter.java:43)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.InjectorImpl.callInContext
(InjectorImpl.java:814)
12-03 17:08:49.532: ERROR/AndroidRuntime(713): at
com.google.inject.internal.ProviderToInternalFactoryAdapter.get
(ProviderToInternalFactoryAdap
Since I have zero experience with Google guice and it looks like guice
is the culprit, I was hoping that some of you might be able to give me
some advice on this.
Thanks in advance,
Mihai