cancel
Showing results for 
Search instead for 
Did you mean: 

oData Service on Hana Express 2.0 Virtual Machine Returns 404 Error

cumbrowski
Explorer
0 Kudos

To create an oData Service on my Database, the SAP HANA 2.0, express edition as VM on my local machine, using SAP HANA Studio Version: 2.3.37, I followed this tutorial:

https://help.sap.com/viewer/52715f71adba4aaeb480d946c742d1f6/2.0.02/en-US/1e87e3f9e43641f3994ec0074b...

There was only one different behavior to the one documented. In the Repository it created no folders, but packages from the name automatically.

It is not working for me. I get a 404 Error, which is most confusing for me. No permission denied or application error. Just a 404. I am lost. 😞

Notes

Everything is "Activated" in the Repository, everything was validated.

I have the .xsaccess and .xsapp files

.xsapp

{}

.xsaccess

{

"exposed":true

}

hello.odata

service {
"mycompany.com.testing::otable";
}

The XS Engine is running (https://hxehost:4390 and http://hxehost:8090 return that the XS Engine is up and running)

I use the "Run As" / "XS Service" from the project on the file.xsodata definition file. It opens a browser and navigates to

https://hxehost:4390/package/package/file.xsodata

and I get a 404 Error in the layout of the XS Engine (not the browser)


Screen Shots

System (you can see the Object and the oData Service definition)

Table

Repository

Project

XS Engine Root URL

404 Error URL where I expect my oData Service Endpoint

Please Help

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor

I guess that is because in HXE not all (obsolete) XS Classic stuff is installed.

For details please check post: Missing XS Classic in HANA express? Here’s how to get it back

cumbrowski
Explorer
0 Kudos

Hi Florian,

It did not work. I am using the System Only VM (3,6 GB) and not the large 15 GB Image. Could that be the issue?

here are the results that I got, when I executed the 3 documented Steps

Step 1.

It states, that no "delivery units" to import. The Screenshot in the article shows the units "HDC_SYS_ADMIN" and "HANA_SYS_ADMIN"

hxeadm@hxehost:/usr/sap/HXE/HDB90> /hana/shared/HXE/global/hdb/install/bin/hdbupdrep --content_directory=/hana/shared/HXE/global/hdb/auto_content
SAP HANA Lifecycle Management - Update Repository 2.4.86
********************************************************
Enter System Database User Name [SYSTEM]: SYSTEM
Enter System Database User (SYSTEM) Password:
Importing delivery units...
No delivery units to import
Update Repository done
Log file written to '/var/tmp/hdb_HXE_UpdateRepository_2020-10-22_09.07.02/hdbupdrep.log' on host 'hxehost'.
hxeadm@hxehost:/usr/sap/HXE/HDB90> /hana/shared/HXE/global/hdb/install/bin/hdbupdrep --content_directory=/hana/shared/HXE/global/hdb/auto_content/systemdb
SAP HANA Lifecycle Management - Update Repository 2.4.86
********************************************************
Enter System Database User Name [SYSTEM]: SYSTEM
Enter System Database User (SYSTEM) Password:
Importing delivery units...
No delivery units to import
Update Repository done
Log file written to '/var/tmp/hdb_HXE_UpdateRepository_2020-10-22_09.07.49/hdbupdrep.log' on host 'hxehost'.

STEP 2.

Instance is 90 and yes, I replaced <PASSWORD> with the right System Password

hxeadm@hxehost:/usr/sap/HXE/HDB90> sudo su - hxeadm
Directory: /usr/sap/HXE/HDB90
Thu Oct 22 09:09:44 CEST 2020
hxeadm@hxehost:/usr/sap/HXE/HDB90> hdbsql -i  -n localhost:39013 -u SYSTEM -p <PASSWORD> "alter system alter configuration('nameserver.ini','SYSTEM') SET ('statisticsserver','active') = 'true' with reconfigure"
Username: Password: * -10709: Connection failed (RTE:[89006] System call 'connect' failed, rc=111:Connection refused (localhost:30015))

Step 3.

Running Queries on System DB. First 4 returned an error

Could not execute 'CALL GRANT_ACTIVATED_ROLE ('sap.hana.ide.roles::EditorDeveloper','SYSTEM')' in 27 ms 604 µs . 
SAP DBTech JDBC: [389]: invalid role name: sap.hana.ide.roles::EditorDeveloper 
Could not execute 'CALL GRANT_ACTIVATED_ROLE ('sap.hana.ide.roles::CatalogDeveloper','SYSTEM')' in 1 ms 645 µs . 
SAP DBTech JDBC: [389]: invalid role name: sap.hana.ide.roles::CatalogDeveloper 
Could not execute 'CALL GRANT_ACTIVATED_ROLE ('sap.hana.ide.roles::SecurityAdmin','SYSTEM')' in 1 ms 189 µs . 
SAP DBTech JDBC: [389]: invalid role name: sap.hana.ide.roles::SecurityAdmin 
Could not execute 'CALL GRANT_ACTIVATED_ROLE ('sap.hana.ide.roles::TraceViewer','SYSTEM')' in 1 ms 578 µs . 
SAP DBTech JDBC: [389]: invalid role name: sap.hana.ide.roles::TraceViewer 
Statement 'ALTER SYSTEM ALTER CONFIGURATION ('webdispatcher.ini', 'system') SET('profile', ...' 
successfully executed in 27 ms 516 µs  (server processing time: 26 ms 675 µs) - Rows Affected: 0 
Duration of 5 statements: 59 ms 
pfefferf
Active Contributor
0 Kudos

XS Classic is not part anymore of both HXE options (server-only and server + apps).

cumbrowski
Explorer
0 Kudos

Uhh.. thank you. Could you point me to an alternative tutorial that allows me to expose HANA DB content (Tables, Views etc.) on HXE via Web Service (if possible oData)?

pfefferf
Active Contributor
0 Kudos

One option would be to use XS Advanced (for that you have to use the HXE version server + applications). With that you could use the Cloud Application Programm model for which allows to to create an OData service very easily on top of your entities.

cumbrowski
Explorer
0 Kudos

Thank you for all your help Florian. I will have a look.

Note and recommendation for SAP: If the XS Engine is not really running on the documented port, please do not show, that it is running.

The XS Advance stuff runs on different ports (from what I learned so far). I had access to newer on premise HANA installations, where only XS Advance Engine was running (on different ports). When I used there the Ports 43XX and 80XX ports, No Service was available there.

https://hxehost:4390 and http://hxehost:8090 should not return some error, if all your documentations and tutorials for the XSE Classic services point to that service. I spent several days now, because I doubted myself and not SAP, that I did something wrong.

For that reason I was going back to the simplest tutorial I could find on that subject and followed it by the "T" without success. Okay.. maybe I am preloaded as somebody with over 20 years database experience on MS SQL Server, trying to understand every step I took, but c'mon.

I hope you understand what I mean.