Could not initialize class KinesisClientLibConfiguration while integrating kinesis consumer

302 Views Asked by At

I am integrating kinesis in my java springboot project, i am able to publish the data into kinesis stream but while consuming it i am getting error like below :

Could not initialize class com.amazonaws.services.kinesis.clientlibrary.lib.worker.KinesisClientLibConfiguration

Error coming on below line exactly :

KinesisClientLibConfiguration kinesisClientLibConfiguration = null;
         kinesisClientLibConfiguration = new KinesisClientLibConfiguration(applicationName, streamName, credentialsProvider, workerId);

I am using below version for integration in my pom.xml :

com.amazonaws(sdk) : 1.11.980 and kcl (amazon-kinesis-client) version : 1.9.0

I got to know KinesisClientLibConfiguration is deprecated in 1.9.0 so i used 1.14.2 as well but issue is still the same.

Can someone please help me on this ?

Thanks in advance

1

There are 1 best solutions below

0
On

I had the same issue but to find out what is causing the issue, run your jar file in EC2 machine within its file location 'java -jar package.jar'

In my case, my jar was created with higher java version but in EC2 it was lower version.