Skip to Content
Nov 30, 2016 at 02:08 PM

SAP HCP trial, java connect to hana DB, connection refused?

605 Views Last edit Jul 09, 2019 at 07:32 AM 2 rev

Hi All, I want to connect with java eclipselink 2.5.1 to hana DB.

The connection is successfull with the neo tunnel to hana server and I can reach the database from local!

But after I have deploed the app to the cloud, there is this error on running:

<error xmlns=""> <code>500</code>

");"><message> Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: SAP DBTech JDBC: Cannot connect to jdbc:sap://localhost:30015/ [Cannot connect to host localhost:30015 [errno: 111 (Connection refused), error: Connection refused (local port 49906 to address, remote port 30015 to address (localhost))], -813.]. Error Code: -813 </message>


Eclipselink settings:
<property name="eclipselink.jdbc.native-sql" value="true"/>
<property name="javax.persistence.jdbc.url" value="jdbc:sap://localhost:30015/"/>
<property name="javax.persistence.jdbc.user" value="****"/>
<property name="javax.persistence.jdbc.password" value="*****"/>
<property name="javax.persistence.jdbc.driver" value=""/>

Thanks in advance,

Sandor Veres DEV