Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

com.parse.ParseException: bolts.ExecutorException: An exception was thrown by an Executor #134

Open
baiju-emedsim opened this issue Jul 31, 2017 · 0 comments

Comments

@baiju-emedsim
Copy link

Below is my code.
dependencies {
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.parse:parse-android:1.15.7'
compile 'com.parse.bolts:bolts-tasks:1.4.0'
compile 'com.parse.bolts:bolts-applinks:1.4.0'
}
private void appLevel_Lang(final Context cntxt) {

    if (db == null) {
        db = new DataBaseHelper(cntxt);
    }
    try {
        final ParseQuery<ParseObject> query = ParseQuery.getQuery("appSupportedLanguages");
        query.setLimit(100);
      
        Date dbLastUpdatedDate = db.getLastUpdateDateOfTable("appSupportedLanguages");

        if (dbLastUpdatedDate != null) {
            query.whereGreaterThan("updatedAt", dbLastUpdatedDate);
        }
        query.orderByAscending("updatedAt");
        query.findInBackground(new FindCallback<ParseObject>() {
            @Override
            public void done(List<ParseObject> applvl_LangList, ParseException e) {

                if (e == null) {

                    if (applvl_LangList.size() > 0) {
                        String lastUpdatedDate = ParseQueries.getNSDateFormatterUpdateAtForParse().format(applvl_LangList.get(applvl_LangList.size() - 1).getUpdatedAt());

                        for (ParseObject p : applvl_LangList) {
                            AppLevelLanguage appLevelLanguage = new AppLevelLanguage();
                            appLevelLanguage.objectID = p.getObjectId();
                            appLevelLanguage.key = p.getString("key");
                            appLevelLanguage.updatedAt = lastUpdatedDate;
                            ArrayList<String> arrLangColNames = (ArrayList<String>) ParseConfig.getCurrentConfig().get("supportedLanguages");
                            for (String strLangCode : arrLangColNames) {
                                p.getString(strLangCode);
                                appLevelLanguage.langHashMap.put(strLangCode, p.getString(strLangCode));
                            }
                             db.insertOrUpdateAppSupportedLanguageTable(appLevelLanguage);
                        }
                    }
                    if (applvl_LangList.size() == query.getLimit()) {
                        appLevel_Lang(cntxt);
                    } else {
                        Log.d("", "AppSupportedLanguages is not equal to limit");
                    }

                } else {
                    Log.d("AppSupportedLanguages", "Error: " + e.getMessage());
                }
            }
        });
    } catch (Exception e) {
        e.printStackTrace();
    }

}

This is my new Project.The above similar code is running my older project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@baiju-emedsim and others