on 04-18-2016 10:52 AM
Hi Experts,
I've created my own sandbox in Eclipse to test and extend Standard Fiori apps.
I've downloaden and uploaded a standard Fiori app (CRM_MYCONT) to my Eclipse workspace.
After that, I did the appconfig, the configuration of the proxy and the installation of the tomcatserver.
This all works fine.
So when I go to:
http://localhost:8080/CRM_MYCONT/test-resources/sap/ushell/shells/sandbox/fioriSandbox.html
I can see my Fiori luanchpad, with the CRM_MYCONT app:
When I click on the tile, I get the message that the app doesn't work:
In the javaconsole:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8080/CRM_MYCONT/resources/sap-ui-core.js Failed to load resource: the server responded with a status of 404 (Not Found)send @ sap-ui-core.js:27
sap-ui-core.js:80 2016-04-18 11:45:11 registerResourcePath ('cus/crm/mycontacts', '/CRM_MYCONT/') - sap.ui.ModuleSystem
2http://localhost:8080/CRM_MYCONT/resources/sap-ui-core.js Failed to load resource: the server responded with a status of 404 (Not Found)send @ sap-ui-core.js:27
sap-ui-core.js:80 2016-04-18 11:45:11 registerResourcePath ('cus/crm/mycontacts', '/CRM_MYCONT/') - sap.ui.ModuleSystem
sap-ui-core.js:80 2016-04-18 11:45:11 Application initialization failed due to an Exception:
Error: found in negative cache: 'cus/crm/mycontacts/Component.js' from /CRM_MYCONT/Component.js: 404 - Not Found
at a1 (http://localhost:8080/CRM_MYCONT/resources/sap-ui-core.js:80:15688)
at Object.jQuery.sap.require (http://localhost:8080/CRM_MYCONT/resources/sap-ui-core.js:80:19389)
at g (http://localhost:8080/CRM_MYCONT/resources/sap-ui-core.js:144:57068)
at Function.sap.ui.component.load (http://localhost:8080/CRM_MYCONT/resources/sap-ui-core.js:144:57886)
at Object.sap.ui.component (http://localhost:8080/CRM_MYCONT/resources/sap-ui-core.js:144:56721)
at Object.sap.ui.core.Control.extend.renderer [as render] (http://localhost:8080/CRM_MYCONT/resources/sap/ushell/components/container/ApplicationContainer.js:2...)
at R.renderControl (http://localhost:8080/CRM_MYCONT/resources/sap-ui-core.js:144:140482) - z @ sap-ui-core.js:80
sap-ui-core.js:80 2016-04-18 11:45:11 Error - found in negative cache: 'cus/crm/mycontacts/Component.js' from /CRM_MYCONT/Component.js: 404 - Not Found z @ sap-ui-core.js:80
sap-ui-core.js:80 2016-04-18 11:45:11 App kon niet worden geopend; probeer het later opnieuw - z @ sap-ui-core.js:80
Layout.js:1 Uncaught TypeError: Cannot read property 'appendChild' of null
It looks like the Component.js can not be found.
But:
it's there...
What can be the problem?
KR,
Andy
Hi Andy,
Your appconfig should look like below
{
"applications" : {
"<semantic object>-<action>" : {
"additionalInformation" : "SAPUI5.Component=<your application namespace>",
"applicationType" : "URL",
"url" : "/<Eclipse project>",
"description" : "<app description>"
}
}
}
And if your app is using an odata service and not mock data, then try defining service uRL in your component.js as below. Also define a function for your getServiceURL like below. I had initially faced a lot of challenges to setup my App on Launchpad sandbox.
serviceUrl : URI(
getServiceUrl("/sap/opu/odata/sap/<whatever>/"))
}
function getServiceUrl(sServiceUrl) {
// for local testing prefix with proxy
// if you and your team use a special host name or IP like 127.0.0.1 for
// localhost please adapt the if statement below
if (window.location.hostname == "localhost") {
var str = window.location.pathname;
var patt = new RegExp(
"test-resources/sap/ushell/shells/sandbox/fioriSandbox.html");
if (patt.test(str)) {
return "../../../../../" + "proxy" + sServiceUrl;
} else {
return "proxy" + sServiceUrl;
}
} else {
return sServiceUrl;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mathew,
Now I get the message that the OData call failes...
I added this in the web.xml file:
<!-- ============================================================== -->
<!-- UI5 proxy servlet -->
<!-- ============================================================== -->
<servlet>
<servlet-name>SimpleProxyServlet</servlet-name>
<servlet-class>com.sap.ui5.proxy.SimpleProxyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SimpleProxyServlet</servlet-name>
<url-pattern>/proxy/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>com.sap.ui5.proxy.REMOTE_LOCATION</param-name>
<param-value>http://xxxx.atosorigin-ica.com</param-value>
</context-param>
do I have to do something more?
KR
Hi Andy,
Make an entry of your application in app.config file in your Eclipse environment and try to access your application.
Regards,
Arun Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andy,
After deploying the extended app to the ABAP repository, go to SE80, select your BSP (corresponding to the extended app) and check if the Component.js file is visible.
Also can you post screen shots of your launchpad in LPD_CUST and the tile and target mapping properties from launchpad designer?
Regards,
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.