我已从Worklight 6.1.0.1升级到6.2,此后,我的应用程序已成功停止加载jsonstore。
它说它找不到类StoragePlugin,尽管该类实际上位于worklight-android.jar中
它也在config.xml文件中声明:
<feature name="StoragePlugin">
<param name="android-package" value="com.worklight.androidgap.plugin.storage.StoragePlugin"/>
</feature>
这是我在Android设备上运行时的logcat输出:
07-01 20:58:48.851: D/NONE(4379): initializing JSONStore...
07-01 20:58:49.671: D/SoftKeyboardDetect(4379): Ignore this event
07-01 20:58:49.765: W/System.err(4379): java.lang.ClassNotFoundException: com.worklight.androidgap.plugin.storage.StoragePlugin
07-01 20:58:49.765: W/System.err(4379): at java.lang.Class.classForName(Native Method)
07-01 20:58:49.765: W/System.err(4379): at java.lang.Class.forName(Class.java:217)
07-01 20:58:49.765: W/System.err(4379): at java.lang.Class.forName(Class.java:172)
07-01 20:58:49.765: W/System.err(4379): at org.apache.cordova.PluginEntry.getClassByName(PluginEntry.java:117)
07-01 20:58:49.765: W/System.err(4379): at org.apache.cordova.PluginEntry.createPlugin(PluginEntry.java:93)
07-01 20:58:49.765: W/System.err(4379): at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:278)
07-01 20:58:49.765: W/System.err(4379): at org.apache.cordova.PluginManager.execHelper(PluginManager.java:232)
07-01 20:58:49.765: W/System.err(4379): at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
07-01 20:58:49.765: W/System.err(4379): at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
07-01 20:58:49.765: W/System.err(4379): at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:229)
07-01 20:58:49.765: W/System.err(4379): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:646)
07-01 20:58:49.765: W/System.err(4379): at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 20:58:49.765: W/System.err(4379): at android.os.Looper.loop(Looper.java:137)
07-01 20:58:49.765: W/System.err(4379): at android.app.ActivityThread.main(ActivityThread.java:4514)
07-01 20:58:49.765: W/System.err(4379): at java.lang.reflect.Method.invokeNative(Native Method)
07-01 20:58:49.765: W/System.err(4379): at java.lang.reflect.Method.invoke(Method.java:511)
07-01 20:58:49.765: W/System.err(4379): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
07-01 20:58:49.773: W/System.err(4379): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
07-01 20:58:49.773: W/System.err(4379): at dalvik.system.NativeStart.main(Native Method)
07-01 20:58:49.773: W/System.err(4379): Caused by: java.lang.NoClassDefFoundError: com/worklight/androidgap/plugin/storage/StoragePlugin
07-01 20:58:49.773: W/System.err(4379): ... 19 more
07-01 20:58:49.773: W/System.err(4379): Caused by: java.lang.ClassNotFoundException: com.worklight.androidgap.plugin.storage.StoragePlugin
07-01 20:58:49.773: W/System.err(4379): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
07-01 20:58:49.773: W/System.err(4379): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
07-01 20:58:49.773: W/System.err(4379): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
07-01 20:58:49.773: W/System.err(4379): ... 19 more
07-01 20:58:49.773: I/System.out(4379): Error adding plugin com.worklight.androidgap.plugin.storage.StoragePlugin.
07-01 20:58:49.781: D/PluginManager(4379): exec() call to unknown plugin: StoragePlugin
07-01 20:58:49.781: D/SoftKeyboardDetect(4379): Ignore this event
07-01 20:58:49.882: D/NONE(4379): JSONStore initialize FAIL
07-01 20:58:49.898: D/NONE(4379): {
07-01 20:58:49.898: D/NONE(4379): "src": "initCollection",
07-01 20:58:49.898: D/NONE(4379): "err": -11,
07-01 20:58:49.898: D/NONE(4379): "msg": "OPERATION_FAILED_ON_SPECIFIC_DOCUMENT",
07-01 20:58:49.898: D/NONE(4379): "col": "categories",
07-01 20:58:49.898: D/NONE(4379): "usr": "jsonstore",
07-01 20:58:49.898: D/NONE(4379): "doc": "Class not found",
07-01 20:58:49.898: D/NONE(4379): "res": {}
07-01 20:58:49.898: D/NONE(4379): }
07-01 20:58:49.937: D/dalvikvm(4379): GC_CONCURRENT freed 356K, 12% free 8356K/9479K, paused 2ms+4ms
07-01 21:00:49.687: D/CordovaActivity(4379): Paused the application!
07-01 21:00:49.687: D/CordovaWebView(4379): Handle the pause
有什么可能导致这种情况的线索吗?
最佳答案
我们刚刚确认了这是一个实际的缺陷,我们将修复它。快速修复方法是将com.worklight.androidgap.plugin.storage.storageplugin更改为com.worklight.androidgap.plugin.storageplugin(删除“.storage.”部分),然后它将再次工作。
关于android - IBM Worklight 6.2-StoragePlugin上的错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24519695/