Topic Connect to HANA

Sue started the topic:
2018-03-06 15:44

Connect to HANA

Trying to connect to a HANA database using the com.sap.dbtech.jdbc.DriverSapDB driver class with the ngdbc.jar file, which is registered in my CLASSPATH. I don't have any other HANA software installed on my PC, just the registered ngdbc.jar file.

When I try to add the Local JAR file in DataCleaner, I get the following error, what am I doing wrong?

Error while loading driver


Message:
java.lang.IllegalStateException: Could not load driver class
Level:
SEVERE
Stack Trace:
Could not load driver class
org.datacleaner.database.UserDatabaseDriver.loadDriver(UserDatabaseDriver.java:99)
org.datacleaner.windows.AddDatabaseDriverDialog$2.actionPerformed(AddDatabaseDriverDialog.java:109)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$500(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
com.sap.dbtech.jdbc.DriverSapDB
java.net.URLClassLoader.findClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
org.datacleaner.database.UserDatabaseDriver.loadDriver(UserDatabaseDriver.java:94)
org.datacleaner.windows.AddDatabaseDriverDialog$2.actionPerformed(AddDatabaseDriverDialog.java:109)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$500(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.awt.EventQueue$3.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.awt.EventQueue$4.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
Arjan replied:
2018-03-07 10:40
What did you fill in in the Driver class name field in the panel where you add your database driver? Note that you need to fill in the fully qualified path to the Driver class.

Note that I don't have access to the ngdbc.jar file myself, because it's not freely available for download, so I can't double check if you filled it in correctly.
Sue replied:
2018-03-08 16:22
The class name is a dropdown, the one I selected was:

com.sap.dbtech.jdbc.DriverSapDB
Arjan replied:
2018-03-09 08:32
You don't have to pick a value from the dropdown, if you don't click the dropdown button, but just click inside the text box in the Drive class name field, a cursor appears and you can fill in any value.

I googled a bit and found this page sap help, which states you should use com.sap.db.jdbc.Driver as driver class, so maybe try that.
Sue replied:
2018-03-15 13:47
I was able to type that driver class name in, but the problem is it doesn't allow me to associate the name of a database to that driver class, so the database name is empty, and doesn't appear when I want to Register a new Datastore, not even in the Database Driver dropdown in the Database Connection window.
Arjan replied:
2018-03-19 09:20
I just tried that (but with another type of database driver). I see that it doesn't work conveniently.

If you create a new Datastore connection using the Other database option, you get a dialog where you can fill in a Datastore name, fill in something like "My Hana connection" here, then ignore the Database driver pulldown, leave it empty, then in the Driver class name field, fill in "com.sap.db.jdbc.Driver" and fill in the connection parameters in the fields below.

Then register the datastore and test the connection.

This worked for me (with another type of database driver, I tested with MariaDB Connector/J, which is freely available). I did have to restart DataCleaner once in between to get it to work.
You are not signed in.
You need to be signed in to participate in the discussion.