Fiori SAPUI5 - App does not work after deployment - deployment

I am developing an SAPUI5 fiori application in the Web IDE (cloud platform).
In the development environment everything works fine. But when I deploy the app on the ABAP Respository and start it in the launchpad, it does not work, because the style.css file is not found.
I took a closer look to the url of the style.css and I realized, that it has a different structure than another app that I have deployed months ago.
This file is not found:
https://mycompany/sap/bc/ui5_ui5/ui2/ushell/resources/~20181114160800~/M_C/FurnitureContract/css/style.css
In this Link above, the namespace of my application is included in the URL: M_C/FurnitureContract
This file is found in another app that works:
https://mycompany/sap/bc/ui5_ui5/sap/moeb_change/~68ABCE58F96887C38EE8B5139A5D5A5E~5/css/style.css
In the link above, the namespace of the application is not included in the URL.
My structure looks like this:
So far I have analysed the other files of my application and they have the following URL structure:
https://mycompany/sap/bc/ui5_ui5/sap/z_moeb/~4E052E59AEEA69D8B40B84C6C43A9CC1~C/component.js
This is the correct URL, but now why is the URL of my css-file different? When I replace the /component.js with /css/style.css and call this URL in the browser, then I get the css file.
Can anyone tell me what I am doing wrong here?
Thanks

Related

Entreprise-Application deployed succesfully but it is not running

I am trying to develop my first web-application based on java-EE. This application should be deployed on WildFly application server. For That purpose, I made my inspiration from https://bitbucket.org/lassitercg/example/src.
I made some modifications on my Code.
I am developing this application using IntelliJ-Community. The Application was successfully deployed.
whenever I try to access the application using the following URL localhost:8080/startweb, I get the http status code 404. The code can be found unter this link https://github.com/amitakCsNew/startweb
Since I using Intellij Community edition, I am forced to deploy the application then set the breakpoint in the Controller of the application. The application seems to be succesfully deployed, but I am not jumping to the first breakpoint.
any Idea how I can solve this problem ?
Your webapp layout is wrong. Please refer to the standard Maven directories layout.
You need to move webapp directory to src/main. Then update pom.xml file reference to web.xml, then move META-INF from resources into webapp then fix your syntax errors in index.xhtml (the same h namespace is associated with 2 different URLs), then fix/implement your database, then add faces servlet in web.xml, add faces-config.xml, then your web app should be available at http://localhost:8080/startweb/.
Once you resolve all the problems and the controller code finally executes, you will be able to debug it from the IDE using Remote debug configuration.
If you are new to all of this, I'd suggest starting with something more simple, like a single JSP page and a single Java servlet.
Post the new questions if you have issues describing what you did to solve the problem and what exactly didn't work. The current question is too broad and your sample project has too many issues to cover in the single answer.

Unable to deploy SAPUI5 application with 404 error

I have created an app through the SAP Web IDE Full-Stack and attempted to deploy it to the SAP Cloud Platform. This appears to work fine, however, when I then go to use the deployed link it just displays "HTTP Status 404 - Not Found".
I tried looking for other solutions but had no luck. Here is my neo-app.json file:
And this is my apps structure:
So it appears that it is pointing to the index correctly, the only thing I am noticing is that in the generated dist it does not contain an index file. I have tried manually adding it but it is being removed upon project rebuilt.
Could this be the problem? If so how can I fix this?
Any help would be greatly appreciated
The folder structure of your SAP UI5 app is very important during deployment. Ideally you should have your webapp folder and your dist folder as the only folders in the root directory of the app. (It's okay if you do not have a dist folder).
Your neo-app.json file should also have a line like "welcomeFile":"webapp/index.html", pointing to your index.html or the root file of your application.
This should mostly solve the HTTP Status 404 issues.
Managed to fix the issue, not entirely sure why, but upon removing the ExternalLib folder i can now successfully deploy and run the app on the SAP cloud platform

How to test SAPUI5 apps locally in apache tomacat installed in eclipse?

I am working on SAPUI5 app which was created long back and running successfully. Now I need to do some enhancements and for that I downloaded the app and uploaded in eclipse.
Now when I am running this app locally - It is not working as the XMLHTTP Request says 404 (Not Found) when accessing the backend OData service.
URI is : /sap/opu/odata/sap/Z****SRV";
I understand that I need to add http://<host>:<port> before URI.
But I cannot change it in all the places. I found out that we can write <param-value> in web.xml file but I did and still it is not working
Can someone guide me how?

Deployed MVC4 application not opens completely

I deployed MVC 4 application to Arvixe.com hosting. In local everything is okay, site opens full, but after deploying, site opens, but, not full. css, jquery, javascript is not working. Only html tags seem.
Arvixe support send this to me: How to Bin Deploy ASP.NET Assemblies on Shared Servers. But I can not understand it well. Can anybody help me to find that why site does not open full? What shloud I check to solve this?
When linking your views and resources you should use relative paths
instead of
"Views/MyView.aspx"
use
"~/Views/MyView.aspx"
This is valid for all resources in your application and it is know to cause these problems.
When working locally the paths are correct since it's all resolved to your computer.
In a web environment you will have to use the relative path so the url is resolved in front of all your resources.

PhoneGap 2.1: after upgrade (2.0 to 2.1) onDeviceReady is not being called remotely

I have an iPhone PhoneGap application. There is a HTML file located in a remote server, and another html file in the project bundle (local).
After upgrading to PhoneGap 2.1, my onDeviceReady() (listening to "deviceready") method is not being called anymore, on the server side. I have a HTML file locally, and locally the method onDeviceReady is being called without any problems. But after being redirected to a web page application, the onDeviceReady() method is not being called anymore. I did not have this kind of issue using PhoneGap 2.0. Do someone have an idea why it might be so?
I have made a completelly new (template) PG Project, using the console, and added the www folder to my server. In the template project, I make a redirection to the index.html in the www remote folder, of the template phonegap project. I have realized, that the same problem always happen: the onDeviceLoad method is not being called. And that's the template project from phonegap. Locally it works ok, but not when its on the server. My allowed ExternalHosts has been set to '*' (all hosts allowed).
I have found out, that other developers have the same problem: https://issues.apache.org/jira/browse/CB-1529
Do someone know how to solve this problem? Thanks in advance.
The PhoneGap Developer Team has answered to my Jira Ticket, and their solution has solved my problem. Here is what they wrote (https://issues.apache.org/jira/browse/CB-1525):
To resolve this locally, change the following line in your cordova.js file:
execXhr.open('HEAD', "file:///!gap_exec", true);
To:
execXhr.open('HEAD', "/!gap_exec", true);