简体   繁体   English

JSONStore错误-PROVISION_TABLE_SEARCH_FIELDS_MISMATCH或USERNAME_MISMATCH_DETECTED

[英]JSONStore errors - PROVISION_TABLE_SEARCH_FIELDS_MISMATCH or USERNAME_MISMATCH_DETECTED

We are interrogating the JSONStore (in a JS app) on a regular bases using the setInterval function and from time to time (ie cannot reproduce it) we get the errors PROVISION_TABLE_SEARCH_FIELDS_MISMATCH or USERNAME_MISMATCH_DETECTED. 我们使用setInterval函数定期(在JS应用中)查询JSONStore,并且有时(即无法重现)我们会收到错误PROVISION_TABLE_SEARCH_FIELDS_MISMATCH或USERNAME_MISMATCH_DETECTED。

The problem is that I never change the search fields or the username (as they are hardcoded). 问题是我从不更改搜索字段或用户名(因为它们是硬编码的)。

Is there any reason that these errors are returned? 是否有任何原因会返回这些错误?

You can review the following list of JSONStore error codes: https://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.1.0/com.ibm.worklight.dev.doc/devref/r_jsonstore_errorcodes.html 您可以查看以下JSONStore错误代码列表: https ://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.1.0/com.ibm.worklight.dev.doc/devref/r_jsonstore_errorcodes.html

-2 PROVISION_TABLE_SEARCH_FIELDS_MISMATCH Search fields are not dynamic. -2 PROVISION_TABLE_SEARCH_FIELDS_MISMATCH搜索字段不是动态的。 It is not possible to change search fields without calling the destroy method or the removeCollection method in the WL.JSONStore class before calling the init method with the new search fields. 在使用新的搜索字段调用init方法之前,如果不调用WL.JSONStore类中的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'}。

and

-6 USERNAME_MISMATCH_DETECTED To log out, a JSONStore user must call the closeAll method in the WL.JSONStore class first. -6 USERNAME_MISMATCH_DETECTED要注销,JSONStore用户必须首先调用WL.JSONStore类中的closeAll方法。 There can be only one user at a time. 一次只能有一个用户。

My guess is that you may want to increase the timeout value you're using. 我的猜测是,您可能想增加使用的超时值。 This does suspiciously sound like a timing issue (you also say that it occurs from "time to time"). 这听起来确实像是一个时机问题(您也说它不时发生)。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM