Skip to Content

relationship between Java application schema and HANA package

Hi all,

I've developed my JPA-based application on the HCP.

From the cloud console, I can see that a schema has been created.

I've opened a db-tunnel using option: -i <id-of-schema>

I can even access this schema from HANA Studio and edit data and table definitions.

I need to expose my tables through OData, and I'd like to use the HANA/XSEngine features to do so (Olingo has some limitations in access control).

As a consequence, I need to create an XSEngine application to expose my tables as OData.

I've followed the instructions in this tutorial, but I get "insufficient privileges" at the point of sharing my project on the server.

I guess the difference is that I've created a db-tunnel/user with -i <id-of-schema> instead of -i <id-of-hana-package>

Actually I have no hana package, I'm just trying to re-use the Java schema.

So my question would be: can I somehow re-use tables created in my Java-side of the Cloud from the native-HANA side?

Thanks, regards


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 19, 2013 at 08:21 AM


    It is exactly as you assumed: The schema type HANA does not allow access from the XS Engine. However, schemas of type HANA XS allow both: access from the XS Engine and access from a Java application.

    So the solution of your problem is

    1. Create a new schema of type HANA XS
    2. Transfer your data from the old schema to the new one (if needed)
    3. Unbind your existing schema of type HANA
    4. Bind the new schema

    A description of how to create, bind, and unbind database schemas can be found in the Managing Schemas section of the online documentation.


    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Bernd,

      thanks so much for your help, please let me know in case there are updates.

      Maybe I can elaborate a bit my scenario if you don't mind.

      From a design standpoint, I need a Java application to re-use existing libraries. On the other hand, I need HANA native to expose OData, use analytic privileges and so on.

      Of course both applications must work on the same data records: HANA will expose Odata services to perform overall CRUD and file upload, while Java will just generate new data records resulting from long-running background processing or log its execution time.

      Do you see any major bad practice/drawback/risk in adopting a shared-schema architecture?

      Thanks a lot



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.