简体   繁体   English

PROVISION_TABLE_SEARCH_FIELDS_MISMATCH用于IBM Mobile First JsonStore初始化

[英]PROVISION_TABLE_SEARCH_FIELDS_MISMATCH for IBM Mobile First JsonStore Initialization

I am using Javascript JSONStore to initialize JsonStore collection in IBM Mobile First Platform 8.0.0. 我正在使用Javascript JSONStore在IBM Mobile First Platform 8.0.0中初始化JsonStore集合。 The issue I am facing is below code working fine for some device and for some device is it Giving below error. 我面临的问题是以下代码在某些设备上可以正常工作,并且对于某些设备是否存在以下错误。

01-19 19:49:43.487 11622-11646/com.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: Table schema mismatch for existing collection. 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.logTrace in JSONStoreLogger.java:197 :: dispatching action "provision" 01-19 19:49:43.498 11622-11646/com.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: invoking action dispatcher "provision" with parameters: 01-19 19:49:43.501 11622-11646/com.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: dbName=inspectorList 01-19 19:49:43.505 11622-11622/com.mobiInspect D/WebView: evaluateJavascript=cordova.callbackFromNative('LoggerPlugin1661877744',true,1,["OK"],false); 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.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: schema={"name":"string"} 01-19 19:49:43.512 11622-11646/com.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: options=[value not logged] 01-19 19:49:43.515 11622-11646/com.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: additionalSearchFields={} 01-19 19:49:43.519 11622-11646/com.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: dropCollection=false 01-19 19:49:43.523 11622-11646/com.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: username=jsonstore 01-19 19:49:43.529 11622-11646/com.mobiInspect D/JSONSTORE: JSONStoreLogger.logTrace in JSONStoreLogger.java:197 :: collectionPassword=xxxxxxxx 01-19 19:49:43.533 11622-11646/com.mobiInspect E/null: Initialization failure on : Task List Collection {"src":"initCollection","err":-2,"msg":"PROVISION_TABL 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: Background sticky concurrent mark sweep GC freed 41582(2MB) AllocSpace objects, 0(0B) LOS objects, 10% free, 15MB/17MB, paused 3.657ms total 148.294ms 01-19 19:49:43.768 11622-11646/com.mobiInspect D/wl.response: WLResponse. 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。 in WLResponse.java:69 :: Response does not include a Content-Encoding header. 在WLResponse.java:69 ::响应中不包含Content-Encoding标头。 Attempting to read response body. 试图读取响应正文。 01-19 19:49:43.814 11622-11646/com.mobiInspect D/wl.request: WLRequestSender.run in WLRequestSender.java:43 :: Sending request https://www.serverurl.com/mfp/api/az/v1/token 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

};

Am I missing anything here for JsonStore Initialization in IBM MFP 8.0? 我在这里是否缺少IBM MFP 8.0中的JsonStore初始化的任何内容? Any help would be appreciated. 任何帮助,将不胜感激。

Error msg 'PROVISION_TABLE_SEARCH_FIELDS_MISMATCH' can occur when 错误消息“ PROVISION_TABLE_SEARCH_FIELDS_MISMATCH”可能在以下情况下发生

Search fields are not dynamic. 搜索字段不是动态的。 It is not possible to change search fields without calling the destroy method or the removeCollection method before you call the init or openmethod with the new search fields. 在使用新的搜索字段调用init或openmethod之前,如果不调用destroy方法或removeCollection方法就无法更改搜索字段。 This error can occur if you change the name or type of the search field. 如果您更改搜索字段的名称或类型,则可能会发生此错误。 For example: {key: 'string'} to {key: 'number'} or {myKey: 'string'} to {theKey: 'string'}. 例如:{key:'string'}到{key:'number'}或{myKey:'string'}到{theKey:'string'}。

See here for more details : http://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/troubleshooting/jsonstore/ 请参阅此处以获取更多详细信息: http : //mobilefirstplatform.ibmcloud.com/tutorials/zh-CN/foundation/8.0/troubleshooting/jsonstore/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JSONStore错误-PROVISION_TABLE_SEARCH_FIELDS_MISMATCH或USERNAME_MISMATCH_DETECTED - JSONStore errors - PROVISION_TABLE_SEARCH_FIELDS_MISMATCH or USERNAME_MISMATCH_DETECTED IBM Mobile第一个JSONstore无法正常运行7.1版本 - IBM Mobile first JSONstore is not working 7.1 version 首次初始化JSONStore集合 - First initialization of a JSONStore Collection WL.JsonStore 未初始化,当尝试在 Android 设备和 Android 模拟器中构建 cordova IBM Mobile First 应用程序时 - WL.JsonStore is not initialized, When trying to build the cordova IBM Mobile First Application in Android devices and In Android Emulator IBM Mobilefirst 7.0-供应期间的JSONStore错误无法找到符号“ CBB_add_u16” - IBM Mobilefirst 7.0 - JSONStore Error during provision cannot locate symbol “CBB_add_u16” Worklight :: JSONStore ::如何使用其他搜索字段 - Worklight :: JSONStore :: How to work with additional search fields IBM Worklight-JSONStore支持 - IBM Worklight - JSONStore support 当高级查询超过999条记录时,IBM Advanced Find JSONStore会显示“ INVALID_SEARCH_FIELD” - IBM Advanced Find JSONStore saying “INVALID_SEARCH_FIELD” when the advanced query exceeds 999 records 按钮单击以首先在 ibm mobile 中显示来自 mysql 的表 - Button click to display a table from mysql in ibm mobile first JSONStore初始化失败 - JSONStore initialization fails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM