cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment from Neo to SAP Cloud Platform Error

0 Kudos

Hello Experts,

We tried to deploy one of our applications from the neo enviroment to the SAP Cloud Platform, using the following guide: https://help.sap.com/viewer/86ce311577794701bae493bddd753aa3/1.53.0.0/en-US/894bb92f12c24cf1abc98757....

Unfortunately after deploying an error occurs at runtime that sap is not defined. (sapnotdefined.png)

After looking for a solution online we changed the bootstrap source in our application to "https://sapui5.hana.ondemand.com/resources/sap-ui-core.js", like it was suggested in some threads we found. (scriptafter.png)

Now the webapp works neither in the web ide nor when it’s deployed. In both we get a CORS error and that the iot library cannot be loaded. The whole application is based on the IoT Freestyle Application Template.

corserror.png

Any help would be appreciated.

Kind Regards,

Paul

vvdries
Contributor
0 Kudos

Hi paul,

I have three questions.

Since I did it myself again recently, following these steps:

https://blogs.sap.com/2018/04/23/deploy-sap-ui5-iot-ae-applications-to-the-neo-environment/comment-p...

1. Can you provide a printscreen of your project structure of your original and "neo-version" project?

2. Your created and deployed the "neo-version" on the same sub-account as the original project?

3. You're sure you also copied the neo-app.json file and not only the webapp folder?

Kind regards,

Dries

0 Kudos

Thank you for taking a look at my problem Dries.

Yes i created both projects in the same WEB IDE Service and neo sub account. Both myself and a colleague of mine folliowed the guide together again but couldnt get it to work.

These are my projects structures: project-structure-iot.png project-structure-ui5-template.png. I already tried copying some of the other files aswell but that didn't really change anything.

The neo-app.json files are identical and when I run inside the WEB IDE everything works like a charm.

Best Regards,

Paul

Accepted Solutions (0)

Answers (2)

Answers (2)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert

Hi Paul,

That help file is intended for those that wish to use the Leonardo IoT Enablement service. Is this what you want?

IoT services from Neo and CF differ a lot from each other. In other words they are not compatible.

Furthermore, you may want to check the SAP AppRouter implementation as it works as an entry point for all microservices under your CF space and it avoids CORS with destination settings. If you are using WebIDE Full Stack, you could check the html5 module template which in turn uses the AppRouter.

Try also the Cloud Business Application template - it creates a db and srv module. Once you add an html5 module it implements the entry point to your services. I've explained this here:

https://blogs.sap.com/2018/12/11/cloud-foundry-authentication-how-it-works-step-by-step/

Best regards,
Ivan

0 Kudos

Hi Paul,

i have same problem.

Did you find a solution for your question?

Best regards,

Abdoulaye