Skip to Content
avatar image
Former Member

SAPUI5 App not running on ABAP Server while working fine on Tomcat

Hello,

i'm very new to the whole topic of SAPUI5 but I'm trying to get into it with guidance of several books. So far I have implemented an OData service which offers basic CRUD functionalities on a custom table. The service works properly according to several tests i have done. Now I'm trying to read the data from this table and show it in a SAPUI5 application. I'am developing in the eclipse IDE so for testing purposes I use a Tomcat Server before pushing the changes to the ABAP Backend. Now my Problem: My SAPUI5 Application is working on the Tomcat Server as intended, but when I try to run it from the ABAP Server I am getting the following Error in Chrome:

EDIT - Providing addtional Informations:

UI5 Version on the ABAP Backend is 1.28.1

This is my controller.js:

And this is my index.html:

Greetings, Marvin

error.png (80.2 kB)
controller.png (11.4 kB)
index.png (33.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Former Member

    UPDATE:

    With this new project structure and changing of line 28 of the index.html file to " sap.ui.localResources("my"); " it is working fine:

    But is this approach intended? Do i have to build a folder structure that equals my namespace?

    EDIT: Keeping old project structure and removing line 28 from the index.html is working too.

    new-structure.png (14.3 kB)
  • Yes. that is what i was coming to. I debugged the code on how modules are loaded and it deals with the resource roots. Very importantly eclipse understands this folder structure of web content and abap does not.

  • Former Member Veeraraghavan Narasimhan

    Hello Veera,

    thank you very much for pointing this out and your overall efforts!

    Kind regards, Marvin

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 18, 2017 at 06:30 AM

    With this new project structure and changing of line 28 of the index.html file to " sap.ui.localResources("my"); " it is working fine:

    UPDATE: Keeping old project structure and removing line 28 from the index.html is working too.

    I hope this could help if someone will have similar problems in future!

    Kind regards, Marvin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 11, 2017 at 07:00 AM

    Hi,

    Try with this,

    var oModel =

    new sap.ui.model.odata.ODataModel(url);

    Change directly in SE80 and activate for quick test (will save some time in changing in eclipse and deploying to ABAP server again).

    Thanks,

    Den

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 11, 2017 at 08:40 AM

    you can go through the discussion from below link, you may get some hint.

    https://blogs.sap.com/2015/06/03/something-about-negative-cache-error/

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Akhilesh,

      i already came across this blog post but unfortunatly it doesn't solved my problem.

      Greetings, Marvin