By using AWS re:Post, you agree to the Terms of Use

Connecting to Athena using JDBC driver from a Spring Java application



I am trying to connect to Athena via latest (2.16) JDBC driver jar from a Java Spring web application. The application also connects to S3 to upload files there. I am seeing this exception when bean for s3 client is being instantiated on addition of the Athena JDBC jar.

I tried upgrading aws-java-sdk-core to 1.11.793 and also latest 1.11.998 as suggested in this post, but it is not helping

Caused by: [Simba][AthenaJDBC](100191) Failed to create AWS Credentials Provider class: com.amazonaws.auth.DefaultAWSCredentialsProviderChain.
_ ... 61 more_
Caused by: java.lang.ClassNotFoundException: com.amazonaws.auth.DefaultAWSCredentialsProviderChain
_ at ~[?:1.8.0_221]_
_ at java.lang.ClassLoader.loadClass( ~[?:1.8.0_221]_
_ at java.lang.ClassLoader.loadClass( ~[?:1.8.0_221]_
_ at java.lang.Class.forName0(Native Method) ~[?:1.8.0_221]_
_ at java.lang.Class.forName( ~[?:1.8.0_221]_
_ at com.simba.athena.athena.utilities.AJUtilities.createAwsCredentialsProvider(Unknown Source) ~[AthenaJDBC42.jar:?]_

asked a year ago250 views
1 Answer

Hi info2anu,

Based on the error it looks like you are missing a class your code depends on. I'd review the API and class doc carefully for build time requirements.


answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions