Skip to Content
0
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="http://docs.oasis-open.org/odata/ns/metadata"> <code>500</code>

");"><message> Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.sap.db.jdbc.exceptions.JDBCDriverException: 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 0.0.0.0, remote port 30015 to address 127.0.0.1 (localhost))], -813.]. Error Code: -813 </message>

</error>

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="com.sap.db.jdbc.Driver"/>

Thanks in advance,

Sandor Veres DEV