Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Active Contributor

This post is part of an entire series

Hana Smart Data Integration - Overview

In order to import the adapters, the easiest method is using the Github for Windows application.

It is installed from here and provides a fairly simple to use interface for the normal git operations.

Once installed, the github web page with the Hana Native Adapter repository is opened

SAP/hana-native-adapters · GitHub

and by clicking on the Clone in Desktop button a local copy of the github repository is created.

(see here for the official help page of github)

This is really just a local copy on the local disk drive with no side effect on the files located in github. The local files can be modified at will.

The last step is to go to Eclipse/Hana Studio and import the Existing Project into Workspace using the Files - Import menu item.

As example the HelloWorldAdapter2 can be imported as a first project.

This adapter has no dependencies to other libraries, so it can be started right away. A right click on the Project and selecting the Debug As - Debug Configurations popup menu item does open the next screen.

In this screen the AgentConfig Launch Configuration should be visible. If it is not, it can be imported as shown in the previous chapter, by import - Debug - LaunchConfiguration and pointing to the /ui directory of the installed agent.

As every adapter has its own dependencies, the required bundles have to be listed and can be validated if any are missing. But actually, that is quite simple.

  1. Deselect all from the Target Platform tree
  2. Click on the Add Required Bundles (multiple times to get deep dependencies as well)
  3. The agent related bundles are part of the imported launch configuration. Doublecheck these are added



    4. org.apache.commons.codec

    5. org.apache.commons.logging*1.1.1.v201101211721

    6. org.apache.felix.gogo.command

    7. org.apache.felix.gogo.runtime


    9. org.eclipse.equinox.console



    12. org.eclipse.osgi.util

  4. Check if all Bundles in the required version are available by hitting the Validate Bundles button.

If the Adapter SDK feature was added as described in the previous chapter and the individual libraries required by each adapter are present, the validation does not return any errors and the Adapter Agent can be started by hitting the Debug button.

Once started, the console window shows the current information of the running plugins.Using the Stop icon at the top of it, it can be stopped at any time.

With these steps the Adapter is running within the Eclipse environment but not known or connected to any Hana instance yet. Basically there are three ways to make the agent and adapter known to Hana.

  1. Execute the create-agent, create adapter etc commands from the SQL console in Hana.
  2. In the Agent install directory run the \configTool\dpagentconfigtool.exe application. It will talk to the Eclipse Agent via TCP and after connecting to Hana it will issue the required Hana commands for registering the agent and the adapters.
  3. In the Console run the command "dplogin hostname port username password". This will create/update the agent using the hostname as agent name and install all adapters started.

In this example the dplogin command was used and caused an error:

osgi> dplogin 30015 system password

Connecting to database...

Connection successful

No Agent with the default name found in Hana, creating one for you using the IP address.

If the hostname should be used run the command dpupdateagenthostname next

create agent "" protocol 'TCP' host '' port 5050 SAP DBTech JDBC: [403]: internal error: Cannot connect to agent: at Context: Cannot connect to hdbdpserver

So the error was "cannot connect to hdbdpserver" meaning that the Hana instance cannot contact Hana's dpserver process. When checking the process list of Hana it truly was not enabled so I did as described in Hana Adapter SDK - Setup

Another typical error at that point is "Agent cannot be found". The architecture is designed to make Hana the driving part. So when the create-agent SQL command is executed, it is Hana trying to contact the agent. If the agent hostname is unknown to Hana or there is a firewall, this will not work. The solution then is to use the IP address (which the dplogin command does by default), open up the firewall or switching to the https/cloud protocol using the dpagentconfig tool.

With that the agent and the adapters are known to Hana and can be used either using SQL commands like create-remote-source or the various UIs.