cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect a local java application to HANA as a Service

LucaToldo
Advisor
Advisor
0 Kudos

Dear all,
I need to develop a Java application, connectinig to HANA service runnning on Cloud Foundry in SCP.
The JDBC connection string that I see in VCAP_SERVICES contains the port 443 and therefore a JDBC connection that is expecting the 3xx1y pattern cannot take place.
I was trying to setup chisel but am not getting as far as I need and am not sure is stilil needed.
Please advice.

Accepted Solutions (0)

Answers (2)

Answers (2)

LucaToldo
Advisor
Advisor
0 Kudos

thankyou ! Indeed it works very smoothly and chisel is not even needed.

andrew_lunde
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Luca,

With HANA as a service running in Cloud Foundry indeed it's listening on port 443 where you'd expect a HTTPS server, but don't let that throw you. Just use the host:port as provided in VCAP_SERVICES and you'll be able to connect from your java app as well as external tools.

Do keep in mind that HANA as a service requires an encrypted connection or it will drop connection attempts.

You can test the connection from your local machine by installing the HANA client libraries for your workstation platform and use the command-line tool.

hdbsql -n some-very-long-hostname.hana.prod-us10.hanacloud.ondemand.com:443 -e -ssltrustcert -u vcap_creds_user -p vcap_creds_password

Hope this helps.

-Andrew