Android 多个javascript的Worklight Uncaught TypeError

Android 多个javascript的Worklight Uncaught TypeError,android,eclipse,ibm-mobilefirst,Android,Eclipse,Ibm Mobilefirst,我正在使用Worklight 6,当我尝试在预览模式或android emulator中运行应用程序时,出现以下未捕获的类型错误: 02-28 00:13:19.727: D/CordovaLog(562): Uncaught TypeError: Cannot read property 'UNSUPPORTED_BROWSER' of undefined 02-28 00:13:19.727: E/Web Console(562): Uncaught TypeError: Cannot re

我正在使用Worklight 6,当我尝试在预览模式或android emulator中运行应用程序时,出现以下未捕获的类型错误:

02-28 00:13:19.727: D/CordovaLog(562): Uncaught TypeError: Cannot read property 'UNSUPPORTED_BROWSER' of undefined
02-28 00:13:19.727: E/Web Console(562): Uncaught TypeError: Cannot read property 'UNSUPPORTED_BROWSER' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/wlclient.js:142
02-28 00:13:20.107: D/CordovaLog(562): Uncaught TypeError: Cannot call method 'getEnvironment' of undefined
02-28 00:13:20.107: E/Web Console(562): Uncaught TypeError: Cannot call method 'getEnvironment' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/encryptedcache.js:24
02-28 00:13:20.247: D/CordovaLog(562): Uncaught TypeError: Cannot read property 'ANDROID' of undefined
02-28 00:13:20.247: E/Web Console(562): Uncaught TypeError: Cannot read property 'ANDROID' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/analytics/analytics.js:43
02-28 00:13:20.347: D/CordovaLog(562): Uncaught TypeError: Cannot set property 'startAcquisition' of undefined
02-28 00:13:20.347: E/Web Console(562): Uncaught TypeError: Cannot set property 'startAcquisition' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/deviceSensors/acquisition.js:50
02-28 00:13:20.417: D/CordovaLog(562): Uncaught TypeError: Cannot call method 'getEnvironment' of undefined
02-28 00:13:20.417: E/Web Console(562): Uncaught TypeError: Cannot call method 'getEnvironment' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/deviceSensors/geo.js:22
02-28 00:13:20.457: D/CordovaLog(562): Uncaught TypeError: Cannot call method 'getEnvironment' of undefined
02-28 00:13:20.457: E/Web Console(562): Uncaught TypeError: Cannot call method 'getEnvironment' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/deviceSensors/wifi.js:399
02-28 00:13:20.527: D/CordovaLog(562): Uncaught TypeError: Cannot set property 'transmitEvent' of undefined
02-28 00:13:20.527: E/Web Console(562): Uncaught TypeError: Cannot set property 'transmitEvent' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/events/eventTransmitter.js:320
02-28 00:13:20.547: D/CordovaLog(562): Uncaught TypeError: Cannot set property 'setKeepAliveInBackground' of undefined
02-28 00:13:20.547: E/Web Console(562): Uncaught TypeError: Cannot set property 'setKeepAliveInBackground' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/deviceSensors/bind.js:21
02-28 00:13:20.627: D/CordovaLog(562): Uncaught TypeError: Cannot call method 'createWLChallengeHandler' of undefined
02-28 00:13:20.627: E/Web Console(562): Uncaught TypeError: Cannot call method 'createWLChallengeHandler' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/challengeHandlers/antiXSRFChallengeHandler.js:12
02-28 00:13:20.647: D/CordovaLog(562): Uncaught TypeError: Cannot call method 'createWLChallengeHandler' of undefined
02-28 00:13:20.647: E/Web Console(562): Uncaught TypeError: Cannot call method 'createWLChallengeHandler' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/challengeHandlers/authenticityChallengeHandler.js:12
02-28 00:13:20.667: D/CordovaLog(562): Uncaught TypeError: Cannot call method 'createProvisioningChallengeHandler' of undefined
02-28 00:13:20.667: E/Web Console(562): Uncaught TypeError: Cannot call method 'createProvisioningChallengeHandler' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/challengeHandlers/deviceAuthAutoProvisioningChallengeHandler.js:11
02-28 00:13:20.677: D/CordovaLog(562): Uncaught TypeError: Cannot call method 'createDeviceAuthChallengeHandler' of undefined
02-28 00:13:20.687: E/Web Console(562): Uncaught TypeError: Cannot call method 'createDeviceAuthChallengeHandler' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/challengeHandlers/deviceAuthNoProvisioningChallengeHandler.js:10
02-28 00:13:20.698: D/CordovaLog(562): Uncaught TypeError: Cannot call method 'createWLChallengeHandler' of undefined
02-28 00:13:20.698: E/Web Console(562): Uncaught TypeError: Cannot call method 'createWLChallengeHandler' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/challengeHandlers/remoteDisableChallengeHandler.js:11
02-28 00:13:20.757: D/CordovaLog(562): Uncaught TypeError: Cannot set property 'extendedGeolocation' of undefined
02-28 00:13:20.757: E/Web Console(562): Uncaught TypeError: Cannot set property 'extendedGeolocation' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/deviceSensors/ExtendedGeolocation.js:237
02-28 00:13:20.837: D/CordovaLog(562): Uncaught TypeError: Cannot set property 'openURL' of undefined
02-28 00:13:20.837: E/Web Console(562): Uncaught TypeError: Cannot set property 'openURL' of undefined at file:///data/data/com.hBC/files/www/default/wlclient/js/wlgap.android.js:33
*(hBC是项目名称)

当我尝试在mobile simulator中运行项目时,我收到以下错误:

    [ERROR] SRVE0777E: Exception thrown by application class  'org.apache.commons.io.FileUtils.openInputStream:190'
java.io.IOException: File 'C:\Users\ADMIN\lastWS_Worklight_h\WorklightServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\72\data\temp\default_node\SMF_WebContainer\hBC\hBC\widget-resources\hBC-android-1.0-67e5a1b0bfe38851fb5006a11b77200e930e4636\preview\default' exists but is a directory
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:190)
at [internal classes]
at com.worklight.gadgets.serving.WebServingServletBase.writeResponse(WebServingServletBase.java:131)
at com.worklight.gadgets.serving.WebServingServletBase.sendResourceResponse(WebServingServletBase.java:78)
at com.worklight.gadgets.serving.PreviewServlet.respondToRequest(PreviewServlet.java:71)
at com.worklight.gadgets.serving.WebServingServletBase.doGetOrPost(WebServingServletBase.java:60)
at com.worklight.gadgets.serving.WebServingServletBase.doGet(WebServingServletBase.java:44)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1240)
at [internal classes]
at com.worklight.core.auth.impl.AuthenticationFilter$1.execute(AuthenticationFilter.java:199)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:203)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]

[ERROR   ] FWLSE0048E: Unhandled exception caught: java.io.IOException: File 'C:\Users\ADMIN\lastWS_Worklight_h\WorklightServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\72\data\temp\default_node\SMF_WebContainer\hBC\hBC\widget-resources\hBC-android-1.0-67e5a1b0bfe38851fb5006a11b77200e930e4636\preview\default' exists but is a directory [project hBC]
java.io.IOException: File 'C:\Users\ADMIN\lastWS_Worklight_h\WorklightServerConfig\servers\worklight\workarea\org.eclipse.osgi\bundles\72\data\temp\default_node\SMF_WebContainer\hBC\hBC\widget-resources\hBC-android-1.0-67e5a1b0bfe38851fb5006a11b77200e930e4636\preview\default' exists but is a directory
[ERROR   ] Error Page Exception: 
                                                                                               hBC
                                                                                               /hBC
                                                                                                   Error Page Exception
                                                                                               com.ibm.ws.webcontainer.webapp.WebAppErrorReport: java.io.IOException: Stream is closed
at com.ibm.wsspi.http.HttpOutputStream.validate(HttpOutputStream.java:187)
at [internal classes]
Caused by: java.io.IOException: Stream is closed
... 3 more

[WARNING ] WARNING: Cannot set status. Response already committed.
[WARNING ] SRVE8094W: WARNING: Cannot set header. Response already committed.
我尝试在eclipse中重新安装ADT和Worklight,但这不是一个好主意。 我安装了最新版本的Worklight,并且存在相同的错误

在一个干净的项目之后仍然没有什么。我必须提到,我没有在构建路径中标记任何缺少的库

我将非常感谢任何帮助

  • 使用6.0.0.2:
  • 验证您对已安装Worklight/application server的位置具有完全读写权限
  • 删除AppData/Temp中的所有Worklight*文件夹

  • 我在另一个工作区(位于另一个分区)尝试了一个示例worklight项目,我也遇到了同样的问题。如果您使用一个新的Eclipse实例、一个新的工作区和插件的重新安装?是,我在worklight 6.0.0.2和worklight 6.1处于预览模式时尝试了几次,收到错误404:请求的路径:/ClientSign不受支持。我试图从AppData/temp中删除temp文件,但仍然没有结果。如果您在另一台PC中尝试,您使用的是哪种Eclipse风格?如果您使用的是Worklight 6.0.0.2,请使用Eclipse Java EE 4.2.2(“Juno”SR2)。