Skip to Content
Feb 21, 2014 at 12:50 AM

ODATA error in SAPUI5


hi Experts,

I am new to SAPUI5 and trying to build a simple application that can consume a OData WS.

In the JS view, i am creating a ODataModel as

var oModel = new sap.ui.model.odata.ODataModel(


This opens a Table in with No Data..

the logs shows below error

  1. GET http://localhost:8080/SITMIL/proxy/$metadata 500 (Internal Server Error) datajs.js:17
    1. o.defaultHttpClient.requestdatajs.js:17
    2. D2datajs.js:17
    3. o.requestdatajs.js:17
    4. o.readdatajs.js:17
    5. sap.ui.model.odata.ODataMetadata._loadMetadataODataMetadata.js:7
    6. sap.ui.base.Object.extend.constructorODataMetadata.js:6
    7. sap.ui.model.Model.extend.constructorODataModel.js:6
    8. osap-ui-core.js:117
    9. sap.ui.jsview.createContentretrieveFlight.view.js:88
    10. (anonymous function)JSView.js:6
    11. sap.ui.base.ManagedObject.runWithPreprocessorssap-ui-core.js:117
    12. sap.ui.core.mvc.JSView.onControllerConnectedJSView.js:6
    13. sap.ui.core.mvc.View._initCompositeSupportView.js:6
    14. sap.ui.base.EventProvider.extend.constructorsap-ui-core.js:117
    15. sap.ui.base.ManagedObject.extend.constructorsap-ui-core.js:117
    16. sap.ui.core.Element.extend.constructorsap-ui-core.js:117
    17. fsap-ui-core.js:117
    18. fsap-ui-core.js:117
    19. osap-ui-core.js:117
    20. sap.ui.viewView.js:6
    21. o.(anonymous function)sap-ui-core.js:117
    22. (anonymous function)(index):18

I have seen many posts here which talks about "proxy/" prefix change. But removing the proxy prefix throws 501 error.

I have also tried to use the other SAP GW WS -; which also gave same error.

Please help to fix this error.