I started having this error when I enabled the Local Datastore. I don't know how to fix it. I'm looking at documentation, but have found nothing so far... the app doesn't crash, but nothing can be saved to the user object, apparently most of the time.
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): Failed to run command.
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): com.parse.ParseException: Parse::UserCannotBeAlteredWithoutSessionError
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.ParseCommand.onPostExecute(ParseCommand.java:334)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.ParseRequest$5.then(ParseRequest.java:321)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.ParseRequest$5.then(ParseRequest.java:318)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$11.run(Task.java:481)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.completeAfterTask(Task.java:477)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.continueWithTask(Task.java:353)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.continueWithTask(Task.java:364)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$9.then(Task.java:410)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$9.then(Task.java:402)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$11.run(Task.java:481)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.completeAfterTask(Task.java:477)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.access$400(Task.java:22)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$7.then(Task.java:346)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$7.then(Task.java:343)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.runContinuations(Task.java:510)
I managed to point out the code which produces the error. It has to do with using saveEventually() in the current user... it doesn't happen using saveinbackground()...
ParseUser cu = ParseUser.getCurrentUser();
if (cu != null) {
String locale = getResources().getConfiguration().locale.getDisplayName();
cu.put("locale", locale);
cu.put("version", ParseInstallation.getCurrentInstallation().getString("appVersion"));
cu.saveEventually(); //doesn't happen with cu.saveInBackground();
}
Parse Android Changelog
v1.5.1 — May 30, 2014
Fixed various bugs with Local
Datastore.
There were indeed some bugs with the last Parse Android SDK v1.5.0, but for me they got fixed with today's release of the version 1.5.1, you should check it out and try again.
Related
I am getting a crash on Samsung Note 2 with parse sdk version 1.5.1 and below is my Application class code.
#Override
public void onCreate()
{
super.onCreate();
try
{
Parse.enableLocalDatastore(this);
// Live acc
Parse.initialize(this, "XXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXX");
//Enable to receive push
PushService.setDefaultPushCallback(this, RespondToPushActivity.class);
Log.d("System out", "Parse ID----> "+ParseInstallation.getCurrentInstallation().getString("deviceToken"));
Constants.PARSEID = ParseInstallation.getCurrentInstallation().getString("deviceToken");
ParseInstallation.getCurrentInstallation().saveInBackground();
}
catch (Exception e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Now I got the stacktrace below:
java.lang.RuntimeException: java.util.ConcurrentModificationException
at com.parse.PushRouter$8$1.run(PushRouter.java:235)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.util.ConcurrentModificationException
at java.util.LinkedList$LinkIterator.next(LinkedList.java:124)
at com.parse.ParseObject.mergeREST(ParseObject.java:928)
at com.parse.OfflineStore$13$2.then(OfflineStore.java:765)
at com.parse.OfflineStore$13$2.then(OfflineStore.java:762)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$8.then(Task.java:381)
at com.parse.Task$8.then(Task.java:373)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.onSuccess(Task.java:373)
at com.parse.Task.onSuccess(Task.java:393)
at com.parse.OfflineStore$13.then(OfflineStore.java:762)
at com.parse.OfflineStore$13.then(OfflineStore.java:721)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.continueWithTask(Task.java:364)
at com.parse.Task$9.then(Task.java:410)
at com.parse.Task$9.then(Task.java:402)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.access$400(Task.java:22)
at com.parse.Task$7.then(Task.java:346)
at com.parse.Task$7.then(Task.java:343)
at com.parse.Task.runContinuations(Task.java:510)
at com.parse.Task.access$800(Task.java:22)
at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
at com.parse.Task$11$1.then(Task.java:493)
at com.parse.Task$11$1.then(Task.java:485)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$11.run(Task.java:485)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.access$400(Task.java:22)
at com.parse.Task$7.then(Task.java:346)
at com.parse.Task$7.then(Task.java:343)
at com.parse.Task.runContinuations(Task.java:510)
at com.parse.Task.access$800(Task.java:22)
at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
at com.parse.Task$11$1.then(Task.java:493)
at com.parse.Task$11$1.then(Task.java:485)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.access$300(Task.java:22)
at com.parse.Task$6.then(Task.java:311)
at com.parse.Task$6.then(Task.java:308)
at com.parse.Task.runContinuations(Task.java:510)
at com.parse.Task.access$800(Task.java:22)
at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
at com.parse.Task$11$1.then(Task.java:493)
at com.parse.Task$11$1.then(Task.java:485)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.access$300(Task.java:22)
at com.parse.Task$6.then(Task.java:311)
at com.parse.Task$6.then(Task.java:308)
at com.parse.Task.runContinuations(Task.java:510)
at com.parse.Task.access$800(Task.java:22)
at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
at com.parse.Task$11$1.then(Task.java:493)
at com.parse.Task$11$1.then(Task.java:485)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$11.run(Task.java:485)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
[7:19:27 PM] Hiren Raval: 2nd once:
[7:19:28 PM] Hiren Raval: java.lang.RuntimeException: Unable to start receiver com.parse.ParseBroadcastReceiver: java.util.ConcurrentModificationException
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2462)
at android.app.ActivityThread.access$1600(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1365)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5317)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.util.ConcurrentModificationException
at java.util.LinkedList$LinkIterator.next(LinkedList.java:124)
at com.parse.ParseObject.mergeREST(ParseObject.java:928)
at com.parse.OfflineStore$13$2.then(OfflineStore.java:765)
at com.parse.OfflineStore$13$2.then(OfflineStore.java:762)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$8.then(Task.java:381)
at com.parse.Task$8.then(Task.java:373)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.onSuccess(Task.java:373)
at com.parse.Task.onSuccess(Task.java:393)
at com.parse.OfflineStore$13.then(OfflineStore.java:762)
at com.parse.OfflineStore$13.then(OfflineStore.java:721)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.continueWithTask(Task.java:364)
at com.parse.Task$9.then(Task.java:410)
at com.parse.Task$9.then(Task.java:402)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.access$400(Task.java:22)
at com.parse.Task$7.then(Task.java:346)
at com.parse.Task$7.then(Task.java:343)
at com.parse.Task.runContinuations(Task.java:510)
at com.parse.Task.access$800(Task.java:22)
at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
at com.parse.Task$11$1.then(Task.java:493)
at com.parse.Task$11$1.then(Task.java:485)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$11.run(Task.java:485)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.access$400(Task.java:22)
at com.parse.Task$7.then(Task.java:346)
at com.parse.Task$7.then(Task.java:343)
at com.parse.Task.runContinuations(Task.java:510)
at com.parse.Task.access$800(Task.java:22)
at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
at com.parse.Task$11$1.then(Task.java:493)
at com.parse.Task$11$1.then(Task.java:485)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$11.run(Task.java:485)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)
Let me know if anyone has a solution for this issue.
I have check this SO as well but no reply over there.
Try fully uninstalling the app from your phone and re-deploy it. I just had the same issue and uninstalling (include deleting cache and configs!) fixed it for me.
Did you make sure to register your custom Application class in the Android Manifest?
<application
android:name=".MyApplication"
...>
.
.
.
</application>
I had the same issue. As it appears in your stacktrace, you encountered a java.util.ConcurrentModificationException when iterating over a LinkedList:
at java.util.LinkedList$LinkIterator.next(LinkedList.java:124)
One solution is to protect your code in a synchronized block or method.
Another solution, which I chose, is to use a collection specifically made for concurrent accesses. In my case I wanted an random accessed list (like ArrayList) so I used instead the java.util.concurrent.CopyOnWriteArrayList provided in Android package java.util.concurrent. I did not find any concurrent access collection for LinkedList but maybe the CopyOnWriteArrayList is enough for you. It is specifically made to read the list a lot and update it rarely.
Wwhile I cannot guarantee I found the exact right solution (it is a concurrent access issue, so this is hard to test), I do not have the bug any more, I consider my issue resolved.
I have a lot of users reporting this crash to the play console. I tested it and it only appears sometimes. The crash occurs in this exact line that I have in the ParseApplication class, which extends the Application class and which should be called before everything else no?
This is the line where it crashes:
Parse.initialize(this, "XXXXXXXXXXXXXXXXXXXXXXXXXXXX", "XXXXXXXXXXXXXXXXXXXXXXXXX");
This is the crash
java.lang.RuntimeException: Unable to create application com.hour.chat.ParseApplication: java.util.ConcurrentModificationException
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4411)
at android.app.ActivityThread.access$1500(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1266)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5081)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:781)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.util.ConcurrentModificationException
at java.util.LinkedList$LinkIterator.next(LinkedList.java:124)
at com.parse.ParseObject.mergeREST(ParseObject.java:928)
at com.parse.ParseUser.mergeREST(ParseUser.java:285)
at com.parse.OfflineStore$13$2.then(OfflineStore.java:765)
at com.parse.OfflineStore$13$2.then(OfflineStore.java:762)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$8.then(Task.java:381)
at com.parse.Task$8.then(Task.java:373)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.onSuccess(Task.java:373)
at com.parse.Task.onSuccess(Task.java:393)
at com.parse.OfflineStore$13.then(OfflineStore.java:762)
at com.parse.OfflineStore$13.then(OfflineStore.java:721)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.continueWithTask(Task.java:353)
at com.parse.Task.continueWithTask(Task.java:364)
at com.parse.Task$9.then(Task.java:410)
at com.parse.Task$9.then(Task.java:402)
at com.parse.Task$11.run(Task.java:481)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.access$400(Task.java:22)
at com.parse.Task$7.then(Task.java:346)
at com.parse.Task$7.then(Task.java:343)
at com.parse.Task.runContinuations(Task.java:510)
at com.parse.Task.access$800(Task.java:22)
at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
at com.parse.Task$11$1.then(Task.java:493)
at com.parse.Task$11$1.then(Task.java:485)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$11.run(Task.java:485)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeAfterTask(Task.java:477)
at com.parse.Task.access$400(Task.java:22)
at com.parse.Task$7.then(Task.java:346)
at com.parse.Task$7.then(Task.java:343)
at com.parse.Task.runContinuations(Task.java:510)
at com.parse.Task.access$800(Task.java:22)
at com.parse.Task$TaskCompletionSource.trySetResult(Task.java:565)
at com.parse.Task$TaskCompletionSource.setResult(Task.java:599)
at com.parse.Task$11$1.then(Task.java:493)
at com.parse.Task$11$1.then(Task.java:485)
at com.parse.Task$10.run(Task.java:448)
at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
at com.parse.Task.completeImmediately(Task.java:444)
at com.parse.Task.continueWith(Task.java:318)
at com.parse.Task.continueWith(Task.java:329)
at com.parse.Task$11.run(Task.java:485)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Since this thread is 4 months old lets update some stuff first;
1)Update to the lastest SDK you can do this at Parse
2) Make sure you have correctly initialized your keys at Application level once you have the SDK in your project like this:
public class YourAppName extends Application {
#Override
public void onCreate() {
super.onCreate();
Parse.initialize(this, "KEY_1", "KEY_2);
}
}
3)Make sure you have this defined in your AndroidManifest.xml like this:
<application
android:name=".YourAppName" <!--This is the important part-->
android:allowBackup="true"
android:icon="#drawable/launcher_icon"
android:label="#string/app_name"
android:theme="#style/Theme.MyTheme">
...
Hope it resolves your problem.
I wanted to obtain user access token for my application to access logged-in user's photos etc. I created a login button as given on facebook android SDK tutorials. I am able to get access token for my admin account which created this application on facebook.
But when I login with any other account, it throws following exception:
I don't understand what I am doing wrong. Ideally, all other persons should be able to login to this app. I am testing it on an emulator. Could it be a problem?
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): Exception during service
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): com.facebook.orca.protocol.base.ApiException: Invalid application 332039450257790
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.protocol.base.ApiResponseChecker.b(ApiResponseChecker.java:74)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.protocol.base.ApiResponseChecker.a(ApiResponseChecker.java:103)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.protocol.base.ApiResponse.g(ApiResponse.java:208)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:267)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.katana.server.protocol.AuthorizeAppMethod.a(AuthorizeAppMethod.java:28)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.protocol.base.SingleMethodRunner.a(SingleMethodRunner.java:125)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.katana.server.handler.PlatformOperationHandler.c(PlatformOperationHandler.java:274)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.katana.server.handler.PlatformOperationHandler.a(PlatformOperationHandler.java:175)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.server.OrcaServiceQueue.d(OrcaServiceQueue.java:218)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.server.OrcaServiceQueue.d(OrcaServiceQueue.java:38)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at com.facebook.orca.server.OrcaServiceQueue$3.run(OrcaServiceQueue.java:169)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at android.os.Handler.handleCallback(Handler.java:587)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at android.os.Handler.dispatchMessage(Handler.java:92)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at android.os.Looper.loop(Looper.java:123)
05-03 01:29:09.618: W/fb4a:fb:OrcaServiceQueue(352): at android.os.HandlerThread.run(HandlerThread.java:60)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): Failed to send
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): com.facebook.orca.ops.ServiceException: API_ERROR: API_ERROR
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.facebook.orca.ops.OrcaServiceOperation.c(OrcaServiceOperation.java:610)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.facebook.orca.ops.OrcaServiceOperation.c(OrcaServiceOperation.java:40)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.facebook.orca.ops.OrcaServiceOperation$2.run(OrcaServiceOperation.java:575)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at android.os.Handler.handleCallback(Handler.java:587)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at android.os.Handler.dispatchMessage(Handler.java:92)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at android.os.Looper.loop(Looper.java:123)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at java.lang.reflect.Method.invokeNative(Native Method)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at java.lang.reflect.Method.invoke(Method.java:521)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-03 01:29:09.628: W/fb4a:fb:GDPDialog(352): at dalvik.system.NativeStart.main(Native Method)
Actually during app creation, I had wrongly selected 'sandboxed' mode which restricts app's access only to developers added in app configuration page. So after disabling this mode, I was able to generate access token for other users too.
I have installed android sdk from this link http://developer.android.com/sdk/index.html.(installer_r18-windows.... android app is working fine.but my phonegap app is not running.same phonegap app is working in installer_r12-windows.exe
Error Message
05-03 19:55:36.310: E/AndroidRuntime(743): FATAL EXCEPTION: main
05-03 19:55:36.310: E/AndroidRuntime(743): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.app.mobilyzer/com.app.mobilyzer.MobilyzerActivity}: java.lang.ClassNotFoundException: com.app.mobilyzer.MobilyzerActivity
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.os.Handler.dispatchMessage(Handler.java:99)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.os.Looper.loop(Looper.java:137)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-03 19:55:36.310: E/AndroidRuntime(743): at java.lang.reflect.Method.invokeNative(Native Method)
05-03 19:55:36.310: E/AndroidRuntime(743): at java.lang.reflect.Method.invoke(Method.java:511)
05-03 19:55:36.310: E/AndroidRuntime(743): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-03 19:55:36.310: E/AndroidRuntime(743): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-03 19:55:36.310: E/AndroidRuntime(743): at dalvik.system.NativeStart.main(Native Method)
05-03 19:55:36.310: E/AndroidRuntime(743): Caused by: java.lang.ClassNotFoundException: com.app.mobilyzer.MobilyzerActivity
05-03 19:55:36.310: E/AndroidRuntime(743): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
05-03 19:55:36.310: E/AndroidRuntime(743): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-03 19:55:36.310: E/AndroidRuntime(743): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
05-03 19:55:36.310: E/AndroidRuntime(743): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
05-03 19:55:36.310: E/AndroidRuntime(743): ... 11 more
You have placed you Jar file in some random folder and then did "Add to build path". This will work in versions older than r17. But now you have to create a folder named libs in your project folder and then just add the phonegap jar file in it and automatically it will be added to class path. And you will not get this issue.
Declare the activity in the Android Manifest? Make sure the launcher activity has the right name? Both possible solutions :D
I am using greenDao to access database in my Android phone. Everything seems fine, and complied. But when I run the program, it crashed at DaoMaster.java -> OpenHelper class, onCreate method at createAllTables(db, false);
Below are the Exception message:
>05-03 15:40:34.109: E/AndroidRuntime(28587): FATAL EXCEPTION: main
05-03 15:40:34.109: E/AndroidRuntime(28587): java.lang.NoClassDefFoundError: com.hook38.sporttimer.model.sql.DaoMaster
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.hook38.sporttimer.model.sql.DaoMaster$OpenHelper.onCreate(DaoMaster.java:42)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:165)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.hook38.sporttimer.controller.CountdownTimerStoreController.<init>(CountdownTimerStoreController.java:32)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.hook38.sporttimer.controller.CountdownTimerController.<init>(CountdownTimerController.java:57)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.hook38.sporttimer.CountDownTimerActivity.onCreate(CountDownTimerActivity.java:49)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.Activity.performCreate(Activity.java:4465)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.os.Handler.dispatchMessage(Handler.java:99)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.os.Looper.loop(Looper.java:137)
05-03 15:40:34.109: E/AndroidRuntime(28587): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-03 15:40:34.109: E/AndroidRuntime(28587): at java.lang.reflect.Method.invokeNative(Native Method)
05-03 15:40:34.109: E/AndroidRuntime(28587): at java.lang.reflect.Method.invoke(Method.java:511)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-03 15:40:34.109: E/AndroidRuntime(28587): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-03 15:40:34.109: E/AndroidRuntime(28587): at dalvik.system.NativeStart.main(Native Method)
I did some research on NoClassDefFoundError, and it means CLASSPATH was not set properly. but I checked the build path, greenDao.jar is in the library. Is there something I miss out??
I solved the problem. I was using the greenDao.jar file from the DaoExample project. The way to solve this is... remove the original greenDao.jar from my java build path. Make a folder call libs under my project. copy the geenDao.jar file from the libs folder in DaoExample project, and paste it into the libs file in my own project. Go to Java build path, libraries, import jar, and add the newly pasted jar file. wala~
The solution is ultra simple - Ensure Maven Dependencies are exported:
Project Properties -> Java Build Path -> Order and Export -> Tick Maven Dependencies
Clean Project