webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Athena jdbc connection

webMethods Community Member

webMethods Community MemberFri June 07, 2024 11:03 AM

  • 1.  Athena jdbc connection

    Posted Thu June 06, 2024 01:45 PM

    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?


    #webMethods


  • 2.  RE: Athena jdbc connection

    Posted Thu June 06, 2024 01:55 PM

    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.
    

    #webMethods


  • 3.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 08:38 AM

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

    I received new error:


    #webMethods


  • 4.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 09:23 AM

    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


    #webMethods


  • 5.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 09:42 AM

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


    #webMethods


  • 6.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 10:07 AM

    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


    #webMethods


  • 7.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 10:13 AM

    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


    #webMethods


  • 8.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 10:21 AM

    sorry by the typo: I mean without success


    #webMethods


  • 9.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 10:35 AM

    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


    #webMethods


  • 10.  RE: Athena jdbc connection



  • 11.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 12:25 PM

    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


    #webMethods


  • 12.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 01:53 PM

    Hi Holger,

    The error persist:


    I don’ have access to WmDB


    #webMethods


  • 13.  RE: Athena jdbc connection

    Posted Mon June 10, 2024 05:56 AM

    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


    #webMethods


  • 14.  RE: Athena jdbc connection

    Posted Thu June 06, 2024 03:04 PM

    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.


    #webMethods


  • 15.  RE: Athena jdbc connection

    Posted Thu June 06, 2024 03:31 PM

    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.


    #webMethods


  • 16.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 10:56 AM

    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.


    #webMethods


  • 17.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 11:03 AM

    Hi Sarlak,
    My version is:
    image


    #webMethods


  • 18.  RE: Athena jdbc connection

    Posted Fri June 07, 2024 11:30 AM

    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?


    #webMethods