簡體   English   中英

PROVISION_TABLE_SEARCH_FIELDS_MISMATCH用於IBM Mobile First JsonStore初始化

[英]PROVISION_TABLE_SEARCH_FIELDS_MISMATCH for IBM Mobile First JsonStore Initialization

我正在使用Javascript JSONStore在IBM Mobile First Platform 8.0.0中初始化JsonStore集合。 我面臨的問題是以下代碼在某些設備上可以正常工作,並且對於某些設備是否存在以下錯誤。

01-19 19:49:43.487 11622-11646 / com.mobi檢查D / JSONSTORE:JSONStoreLogger.java:197中的JSONStoreLogger.logTrace ::現有集合的表架構不匹配。 01-19 19:49:43.492 11622-11646 / com.mobiInspect D / JSONSTORE:JSONStoreLogger.java:197中的JSONStoreLogger.logTrace ::調度動作“設置” 01-19 19:49:43.498 11622-11646 / com.mobiInspect D / JSONSTORE:JSONStoreLogger.java:197中的JSONStoreLogger.logTrace:調用具有參數的動作分派器“ provision”:01-19 19:49:43.501 11622-11646 / com.mobiInspect D / JSONSTORE:JSONStoreLogger.java中的JSONStoreLogger.logTrace :197 :: dbName = inspectorList 01-19 19:49:43.505 11622-11622 / com.mobiInspect D / WebView:valuateJavascript = cordova.callbackFromNative('LoggerPlugin1661877744',true,1,[“ OK”],false); 01-19 19:49:43.506 11622-11646 / com.mobi檢查D / JSONSTORE:JSONStoreLogger.java中的JSONStoreLogger.logTrace:197 :: schema = {“ name”:“ string”} 01-19 19:49:43.512 11622 -11646 / com.mobi檢查D / JSONSTORE:JSONStoreLogger.java中的JSONStoreLogger.logTrace:197 ::選項= [未記錄值] 01-19 19:49:43.515 11622-11646 / com.mobi檢查D / JSONSTORE:JSONStoreLogger.logTrace在JSONStoreLogger.java:197 ::附加搜索字段= {}中01-19 19:49:43.519 11622-11646 / com.mobi檢查D / JSONSTORE:在JSONStoreLogger.java:197中的JSONStoreLogger.logTrace::: :: CollectionCollection = false 01-19 19: 49:43.523 11622-11646 / com.mobi在JSONStoreLogger.java:197中檢查D / JSONSTORE:JSONStoreLogger.logTrace :: username = jsonstore 01-19 19:49:43.529 11622-11646 / com.mobi檢查D / JSONSTORE:JSONStoreLogger.logTrace在JSONStoreLogger.java:197 :: collectionPassword = xxxxxxxx 01-19 19:49:43.533 11622-11646 / com.mobiInspect E / null:初始化失敗:任務列表集合{“ src”:“ initCollection”,“ err”: -2,“ msg”:“ PROVISION_TABL E_SEARCH_FIELDS_MISMATCH“,” col“:” myTasks“,” usr“:” jsonstore“,” doc“:{},” res“:{}} 01-19 19:49:43.535 11622-11646 / com.mobiInspect E / wl.jsonstore:{“ src”:“ initCollection”,“ err”:-2,“ msg”:“ PROVISION_TABLE_SEARCH_FIELDS_MISMATCH”,“ col”:“ myTasks”,“ usr”:“ jsonstore”,“ doc”:{} ,“ res”:{}} 01-19 19:49:43.753 11622-11633 / com.mobiInspect I / art:背景粘性並發標記清除GC已釋放41582(2MB)AllocSpace對象,0(0B)LOS對象,10%免費,15MB / 17MB,暫停3.657ms,總計148.294ms 01-19 19:49:43.768 11622-11646 / com.mobi檢查D / wl.response:WLResponse。 在WLResponse.java:69 ::響應中不包含Content-Encoding標頭。 試圖讀取響應正文。 01-19 19:49:43.814 11622-11646 / com.mobiInspect D / wl.request:WLRequestSender.run in WLRequestSender.java:43 ::發送請求https://www.serverurl.com/mfp/api/az/ v1 /令牌

$scope.init_collection = function () {
    ProgressIndicator.showSimpleWithLabel(false, 'Loading...');

    //Data Collection

    collections1['COLLECTION_NAME'] = {
        searchFields: {'id': 'string', 'processid': 'string', 'state': 'integer'}
    };

    WL.JSONStore.init(collections1, options)
    .then(function () {
        WL.Logger.info("Inside Task Submission Collection");

        WL.JSONStore.fileInfo()
                                .then(function (res) {
                                WL.Logger.debug(" Success response of Task Submission Collection fileInfo :" +JSON.stringify(res));
                                  //res => [{isEncrypted : true, name : carlos, size : 3072}]
                                })

                                  .fail(function (failRes) {
                                  WL.Logger.debug("Failure response of Task Submission Collection fileInfo :" +JSON.stringify(failRes));
                                  // Handle failure.
                                });
    })
    .fail(function (errorObject) {
        //WL.Logger.error(Messages.ERR_LGN_FAIL_INI_DTA_STRG);
        WL.Logger.error("Initialization failure on : Task Submission Collection "+JSON.stringify(errorObject));
    });
    //WL.Logger.info(Messages.INF_LGN_INI_DTA_STRG);
    //Data Collection

    //Image Collection

    collections2["COLLECTION_IMAGE"] = {
        searchFields: {'id': 'string', 'processid': 'string', 'isImageSubmitted': 'boolean'}
    };

    WL.JSONStore.init(collections2, options)
    .then(function () {
        WL.Logger.info("Inside Image Submission Collection");

        WL.JSONStore.fileInfo()
                                    .then(function (res) {
                                    WL.Logger.debug(" Success response of Image Submission Collection fileInfo :" +JSON.stringify(res));
                                      //res => [{isEncrypted : true, name : carlos, size : 3072}]
                                    })

                                      .fail(function (failRes) {
                                      WL.Logger.debug("Failure response of Image Submission Collection fileInfo :" +JSON.stringify(failRes));
                                      // Handle failure.
                                    });
    })
    .fail(function (errorObject) {
        //WL.Logger.error(Messages.ERR_LGN_FAIL_INI_IMG_CLL);
        WL.Logger.error("Initialization failure on : Image Submission Collection "+JSON.stringify(errorObject));
    });
    //WL.Logger.info(Messages.INF_LGN_CLL_INI);

    //Image Collection


    //TODAY Collection

    collections3["COLLECTION_TODAY"] = {
        searchFields: {'id': 'string', 'processid': 'string', 'state': 'integer', 'insname': 'string'}
    };
    WL.JSONStore.init(collections3, options)
    .then(function () {
        WL.Logger.info("Inside Task List Collection");

        WL.JSONStore.fileInfo()
        .then(function (res) {
            WL.Logger.debug("Success response of Task List Collection fileInfo :" +JSON.stringify(res));
                                      //res => [{isEncrypted : true, name : carlos, size : 3072}]
        })
        .fail(function (failRes) {
            WL.Logger.debug("Failure response of Task List Collection fileInfo :" +JSON.stringify(failRes));
            // Handle failure.
        });
    })
    .fail(function (errorObject) {
        //WL.Logger.error(Messages.ERR_LGN_FAIL_INI_IMG_CLL);
        WL.Logger.error("Initialization failure on : Task List Collection "+JSON.stringify(errorObject));
    });
    //WL.Logger.info(Messages.INF_LGN_CLL_INI);

    //TODAY Collection

    //List Collection
    collections4["COLLECTION_LIST"] = {
        searchFields: {'name': 'string'}
    };
    WL.JSONStore.init(collections4, options)
    .then(function () {
        WL.Logger.info("Inside Inspector List Collection");

        WL.JSONStore.fileInfo()
        .then(function (res) {
            WL.Logger.debug("Success response of Inspector List Collection fileInfo :" +JSON.stringify(res));
                                      //res => [{isEncrypted : true, name : carlos, size : 3072}]
        })
        .fail(function (failRes) {
            WL.Logger.debug("Failure response of Inspector List Collection fileInfo :" +JSON.stringify(failRes));
            // Handle failure.
        });
    })
    .fail(function (errorObject) {
        //WL.Logger.error(Messages.ERR_LGN_FAIL_INI_IMG_CLL);
        WL.Logger.error("Initialization failure on : Inspector List Collection " +JSON.stringify(errorObject));
    });
    WL.Logger.info(Messages.INF_LGN_CLL_INI);
    //List Collection

};

我在這里是否缺少IBM MFP 8.0中的JsonStore初始化的任何內容? 任何幫助,將不勝感激。

錯誤消息“ PROVISION_TABLE_SEARCH_FIELDS_MISMATCH”可能在以下情況下發生

搜索字段不是動態的。 在使用新的搜索字段調用init或openmethod之前,如果不調用destroy方法或removeCollection方法就無法更改搜索字段。 如果您更改搜索字段的名稱或類型,則可能會發生此錯誤。 例如:{key:'string'}到{key:'number'}或{myKey:'string'}到{theKey:'string'}。

請參閱此處以獲取更多詳細信息: http : //mobilefirstplatform.ibmcloud.com/tutorials/zh-CN/foundation/8.0/troubleshooting/jsonstore/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM