简体   繁体   中英

Could not initialize class KinesisClientLibConfiguration while integrating kinesis consumer

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM