Skip to Content
0

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

Apr 10, 2017 at 01:45 PM

177

avatar image

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)
10 |10000 characters needed characters left characters exceeded

It is quite strange that it fails in Abap Server. Do you know the UI5 version on server? Additionally can you show the code where the ODataModel is initialized?

1

Hello Veeraraghavan,

thanks for your reply! The UI5 Version should be 1.28:

This is my controller.js:

and this is my index.html:

If further informations are required please let me know!

Greetings,

Marvin

sapui5-version.png (109.1 kB)
controller.png (11.4 kB)
index.png (33.8 kB)
0

What i've additionaly noticed is that the paths in the error are incorrect and may leading to the 404 - PAGE NOT FOUND Error:

The black/red are the used paths, while the green ones are those that should be used in my opinion for not getting an 404.

Greetings, Marvin

paths.png (13.6 kB)
0

Hello Marvin,

This answers partly the issue. Are you creating a standalone UI5 application. Can you attach the screenshot of the the BSP application folder structure. I think the the root of the application is not correctly referenced. By the way how did you upload the application into the BSP repository?

Thanks and Regards,

Veera

1
Veeraraghavan Narasimhan

Hello Veera,

thanks for your efforts so far! I don't know how you define standalone in this context but my application should only use the OData Service from the ABAP Backend. I've uploaded the application to the BSP repository via the eclipse team prov. the BSP structure of my eclipse project is the following:

The corresponding ICF-Node path could be seen in this screenshot:

It could be important to note that my eclipse plugins have i higher version than the Backend (eclipse: 1.44.x - backend: 1.28.1). Maybe this is causing some trouble within the uploading process?

Kind regards,

Marvin

sicf-path.png (13.8 kB)
sicf-path.png (13.8 kB)
0

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)
0

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.

1
Veeraraghavan Narasimhan

Hello Veera,

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

Kind regards, Marvin

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Marvin Gores Apr 18, 2017 at 06:30 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
den colin Apr 11, 2017 at 07:00 AM
0

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

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hello Den,

thanks for your reply! I've followed your suggestion and now i am getting this error:

Is this the same error?

Greetings, Marvin

error2.png (49.6 kB)
0

HI,

No it seems caching issue.

Please delete all your cache(including browser cache) and reload the app.

If still this error persists then you might have to take a look at all nodes in SICF are activated or not.

Thanks,

Den

0

I've deleted the cache via /IWFND/CACHE_CLEANUP but I'm getting the same error. Still, I believe it's the same error as the first one, because I've noticed that i'm getting error1 on the initial page loading and after refreshing the page in the browser i'm getting error2.

Thanks for your efforts so far!

Greetings, Marvin

0

I've also tryed the "Empty Cache & Hard Reload" Option in Chrome if you meant that cache. Doesn't work eather.

Greetings, Marvin

0

In SICF every involved node is activated.

Greetings, Marvin

0
Akhilesh Upadhyay Apr 11, 2017 at 08:40 AM
0

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/

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Akhilesh,

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

Greetings, Marvin

0