Athena jdbc connection

We need to create JDBC connection for Athena Amazon

Product/components used and version/fix level:

webMethods version 9.12

We are using class: com.simba.athena.jdbc.DataSource
and Connection properties:
jdbc:awsathena://AwsRegion=us-east-1;User=xxxxxxxxx;Password=xxxxxxx;S3OutputLocation=s3://xxxxxxx/athena_query_results/

Error receved:
[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource AthenaConn:tesAthena.
[ART.118.5036] Adapter Runtime (Connection): Unable to configure connection manager.
[ADA.1.204] Cannot connect to the database with DataSource class “com.simba.athena.jdbc.DataSource”.
Error creating Driver, Driver class name incorrect.

How we can set the parameters to get Athena connection?

Did you check the documentation? I never used or configured this specifically, but it should be in the documentation. I found the datasources below from page 14 of this document

com.simba.athena.jdbc.Driver
com.simba.athena.jdbc.DataSource

Assuming you already downloaded the JDBC driver and put that to the correct place, it looks like it should connect with your parameters. Where did you put the driver in IS?

According to the document in this link it depends on the version of the driver you are using.

Driver class
Some BI tools ask you to provide the driver class from the JDBC driver .jar file. Most tools find this class automatically. The fully qualified name of the class in the version 3 driver is com.amazon.athena.jdbc.AthenaDriver. In the version 2 driver, the class was com.simba.athena.jdbc.Driver.

I would be surprised if this configuration is supported, given the age of v9.12.

But I concede that this is only a guess and you should check with support.

Latest JDBC driver version is 10.3. 9.12 jdbc is only 1 version behind. In theory, JDBC adapter can use any driver as long as the driver is supported by the jvm. If the latest driver doesn’t work, previous version should work.

I am using the newest driver with dependencies placed on: C:\SoftwareAG912\IntegrationServer\instances\default\packages\WmJDBCAdapter\code\jars

I received new error:

Hi Jorge,

is there anything in the profiles/IS_default/logs/wrapper.log related to this, which might help us further?

Remember, that the WmJDBCAdapter uses the DataSource class for connecting instead of the Driver class.

Regards,
Holger

Hi Holger,
Nothing is saving on …logs
I have changed to oracle.jdbc.pool.OracleDataSource and get new error:

Hi Jorge,

why switching to OracleDatatSource while trying to connect to an Athena Database?
There should be an Athena DataSource class available in the driver.jar.

Regards,
Holger

You are right Holger, I have tested using 3 class names with success:
com.simba.athena.jdbc.Driver
com.simba.athena.jdbc.DataSource
com.amazon.athena.jdbc.AthenaDriver

sorry by the typo: I mean without success

Hi Jorge,

as far as I found out there are 2 different versions of the Athena JDBC driver, a version 2.x and a version 3.x.
Both versions are using different namespaces for their classes:

  • Version 2.x: com.simba.athena.jdbc.*
  • Version 3.x: com.amazon.athena.jdbc.*

Therefore you should check if there is a “com.amazon.athena.jdbc.AthenaDataSource” class available in your athena driver jar for version 3.2.0.

Regards,
Holger

1 Like

Yes Holger


I am trying to use the version 3

Can you check the JVM version your IS uses? I don’t remember the JVM it was shipped with. If the Java version is below 8 you should update it to use that driver. FYI, both of the drivers require minimum JDK 8.

Hi Sarlak,
My version is:
image

Not sure why you can’t connect then. Can you try version 2 and see if it connects? Just for verification though, you checked the requirements and apply them if they were not set, right?

1 Like

Hi Jorge,

in this case try with “com.amazon.athena.jdbc.AthenaDataSource” as the DataSource class for WmJDBCAdapter.

If you have WmDB package available, you can try the Driver class directly for connectivity verification.

Regards,
Holger

1 Like

Hi Holger,

The error persist:


I don’ have access to WmDB

Hi Jorge,

can you try to use the athena driver jar with lesser dependencies (the “lean” variant instead of the “uber” variant) then and check if there are dependency conflicts with jars which are already present in common/lib directory or subdirectories thereof?

It is important to find out, why the DataSource class cannot initialize the underlying Driver class.
This might be a class loading issue due to missing or wrong version dependencies.

Regards,
Holger

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.