cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Fiori App extend - Problems running the downloaded App on Tomcat server

Former Member
0 Kudos

Hi,

I followed the doc fiori10_extend_en.pdf

Once the code Timesheet code is downloaded from /UI5/UI5_REPOSITORY_LOAD,(Few files were missing in the download).

I tried to deploy the same in tomcat server as it is.

I am getting the error as attached.

Is it related to the prerequisite: "The application paths in the extended app point to the correct system" ?

Can you guide me on what all configurations in general is required to view a downloaded app without issues.

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Advisor
Advisor
0 Kudos

So to confirm you should have the following entries in your web.xml

  <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://server:port</param-value>

</context-param>

The service.js you should prepend the url with proxy...

proxy/sap/opu/odata/sap/SRA006_SRV

If your gateway system is https you will also have to add the corresponding certificate into your java keystore.

Regards,

Jamie

Rapid Innovation Group


Former Member
0 Kudos

Hi Jamie ,

I have a same issue in configuring the LaunchPage to my local system

It shows the following errors when I downloaded the code from Fiori and started running in my local system with  Tomcat server  .Can you help me regarding this

Former Member
0 Kudos

hey Jamie,

I followed the steps to make changes in web.xml and service.js but got the following error

Can you help me resolve this error.

Regards,

Mitesh Kamat

jamie_cawley
Advisor
Advisor
0 Kudos

In the index.html file comment out these lines...

//            sap.ca.common.uilib.utils.UserSettings.loadUserSettings(function ()

//           {

                jQuery.sap.require("sap.ca.common.uilib.kelley-core");

                jQuery.sap.registerModulePath("sap.hcm.timesheet.manage", "");

                jQuery.sap.registerModulePath("com.sap.kelley.timesheets", "");

                jQuery.sap.require("com.sap.kelley.timesheets.Descriptor");

                var oDescriptor = new com.sap.kelley.timesheets.Descriptor();

                com.sap.kelley.getAppContainer().addDescriptor("Timesheet Manage", oDescriptor);

                oDescriptor.openApplication("openApplication");

                document.title = oDescriptor.applicationName;

//           });

You could also modify the UserSettings.js if desired.

Regards,

Jamie

SAP - Rapid Innovation Group

Former Member
0 Kudos

I think you missed a configuration step when setting up the project in Eclipse.

See Appendix A in this document:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80649c2f-3bfc-3010-0da6-ae101dcea...

I think you missed step 9 till 12

But better walk through the whole list you might also still need to do some other things to like changing the simpleproxy to /sap/* instead of the /proxy/*

Former Member
0 Kudos

Hi Boer,

We did miss two steps.. setting up the module tab and placing /sap/*..

I will get back to you after trying the same..

Thanks for the reference document. It is very informative.

Thanks,

Kalyan Vemuri,

Technology Consultant.

Former Member
0 Kudos

Hi Boer,

Now I am not able to access the OData services. Getting a 404 not found each time.

I followed the below link and the points in the document you referred to.

https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/TestingInEclipse.html

Environment: Client network.

Changes made: Altered Eclipse network connections and web.xml according to that in the link above.

                        Also tried changing the LAN settings.

Please suggest on any alternative solutions.

Below is the screenshot of the error.

Thanks,

Kalyan Vemuri,

Technology Consultant.

Former Member
0 Kudos

I quickly compared the Appendix in the document i linked and the document you provided.

It seems like they both set it up in a different way. Looking at it, both solutions might work. But you shouldn't mix them.

If i look at the URL it gets the 404 on both settings are mixed. it tries to reach /proxy/sap/* while the proxy redirects for /sap/*

Could you create a new project in eclipse add the original timesheet code you downloaded from the SAP system and then run through the steps in Appendix A in the document i linked.

Just to make sure the configuration from the documents isn't mixed (you might also need to remove the other project from your apache server)

Former Member
0 Kudos

Sure, 

I will try the same and get back to you.

Thanks,

Kalyan Vemuri,

Techonolgy Consultant.

Former Member
0 Kudos

Hi Boer,

Now the 404 error is gone.. But I am getting the 500 internal server error.

Below are the attached screenshots of tomcat log and chrome console.

Seeing the malformed URL, error, i checked for the OData..

http://<host>:<port>/sap/opu/odata/sap/SRA002_TIMESHEET_SRV/InitialInfos?$filter=StartDate%20eq%20'20131101'%20and%20EndDate%20eq%20'20131101'

worked fine.

In web.xml, i provided the same host:port but appended /sap/ as shown is document.

<context-param>

    <param-name>com.sap.ui5.resource.REMOTE_LOCATION</param-name>

    <param-value>http://<host>:<port>/sap/</param-value>

  </context-param>

Should there be any more changes.

Thanks,

Kalyan Vemuri,

Technology Consultant

Former Member
0 Kudos

Can you share your web.xml with me so i can look through it and try it in my own project ?

Looking at the error it seems to go wrong while rebuilding the URL but can't really say at what point it goes wrong.

Former Member
0 Kudos

Hi jamie,

I tried the above mentioned solution but it didn't help. I am left with the following errors.

Can you help me in resolving these errors.

Regards,

Mitesh Kamat

jamie_cawley
Advisor
Advisor
0 Kudos

Please provide the details regarding the changes you made.

Regards,

Jamie

SAP - Rapid Innovation Group

Former Member
0 Kudos

I made changes in web.xml

<

context-param>

<param-name>com.sap.ui5.resource.REMOTE_LOCATION</param-name>

<param-value>http://server:port</param-value>

</context-param>

<servlet-mapping>


   

<servlet-name>SimpleProxyServlet</servlet-name>


   

<url-pattern>/sap/*</url-pattern>


 

</servlet-mapping>

even commented out the suggested lines in index.html

jamie_cawley
Advisor
Advisor
0 Kudos

It would probably be best to start over and only make the changes I indicated in my first post of this thread. This should result in the odata service working.

Regards,

Jamie

SAP - Rapid Innovation Group

Answers (0)