当我初始化我的oData模型时,我收到一些关于data.js文件的错误。我对Odata模型的编码如下:
var oModel = new sap.ui.model.odata.ODataModel(oServiceUrl)
执行此代码时,会出现以下错误。
failed to load 'sap/ui/thirdparty/datajs.js' from ./sap/ui/thirdparty/datajs.js: 404 - NOT FOUND
Caused by: undefined
我三次收到以下错误..
found in negative cache: 'sap/ui/model/odata/ODataMetadata.js' from <unknown>/sap/ui/model/odata/ODataMetadata: Error: failed to load 'sap/ui/thirdparty/datajs.js' from ./sap/ui/thirdparty/datajs.js: 404 - NOT FOUND
Caused by: Error: failed to load 'sap/ui/thirdparty/datajs.js' from ./sap/ui/thirdparty/datajs.js: 404 - NOT FOUND
at j1 (https://sapui5.hana.ondemand.com/resources/sap-ui-core.js:174:4803)
at k1 (https://sapui5.hana.ondemand.com/resources/sap-ui-core.js:174:4896)
at p1 (https://sapui5.hana.ondemand.com/resources/sap-ui-core.js:174:7297)
at r1 (https://sapui5.hana.ondemand.com/resources/sap-ui-core.js:174:9307)
at sap.ui.define (https://sapui5.hana.ondemand.com/resources/sap-ui-core.js:174:11649)
at q1 (https://sapui5.hana.ondemand.com/resources/sap-ui-core.js:174:8066)
at p1 (https://sapui5.hana.ondemand.com/resources/sap-ui-core.js:174:6249)
at r1 (https://sapui5.hana.ondemand.com/resources/sap-ui-core.js:174:9307)
at sap.ui.define (https://sapui5.hana.ondemand.com/res
只有在将应用程序部署到SAP系统时才会发生这种情况。在本地主机上,此错误不会出现(只是关于跨源资源的错误)。