I am trying to implement Elasticache (Memcached version) and seeing this below error,
_Caused by: java.lang.NoSuchMethodError: com.amazonaws.services.elasticache.AmazonElastiCacheClient.beforeClientExecution(Lcom/amazonaws/AmazonWebServiceRequest;)Lcom/amazonaws/AmazonWebServiceRequest;
at com.amazonaws.services.elasticache.AmazonElastiCacheClient.describeCacheClusters(AmazonElastiCacheClient.java:1555)
at org.springframework.cloud.aws.cache.ElastiCacheFactoryBean.createInstance(ElastiCacheFactoryBean.java:67)_
It looks like the implementation of method "beforeClientExecution" is missing from the SDK. AmazonElastiCacheClient.java class where this error is thrown does not have the implementation for this method. Secondly this class extends AmazonWebServiceClient.java and implements AmazonElastiCache.java. None of these classes as well contains the implementation of beforeClientExecution method.
Please advise if I am missing something.
Usually, when I have seen this type of error, it is because I have a mix of aws-java-sdk versions. You need to make sure that you have a set that were released together.
If you are using maven, you can use the maven-versions-plugin to get a list/tree of your dependencies. You should be able to trace down the versions that you have and where you are getting them from. And then use the maven-versions-plugin to declare and keep the versions in sync via versions properties.
This was a version issue with 1.11.98. I upgraded to 1.11.125 and the error was gone. Closing the issue.
Most helpful comment
Usually, when I have seen this type of error, it is because I have a mix of aws-java-sdk versions. You need to make sure that you have a set that were released together.
If you are using maven, you can use the maven-versions-plugin to get a list/tree of your dependencies. You should be able to trace down the versions that you have and where you are getting them from. And then use the maven-versions-plugin to declare and keep the versions in sync via versions properties.