1. Fixed error: java.lang.NoSuchMethodError: com.amazonaws.services.c… #35
Conversation
pir-dsl
commented
Sep 14, 2016
- Fixed error: java.lang.NoSuchMethodError: com.amazonaws.services.cloudwatch.AmazonCloudWatch.putMetricData;
- Fixed compilation error caused by obsolete dependencies in aws java sdk by using more recent dependencies;
- Added items from IDEA to .gitignore file.
…loudwatch.AmazonCloudWatch.putMetricData; 2. Fixed compilation error caused by obsolete dependencies in aws java sdk by using more recent dependencies; 3. Added items from IDEA to .gitignore file.
This is a pretty important fix for CloudWatch monitoring. Would you please merge it? |
Hey dolphy17, glad you feel this is useful. However, I am not the owner or developer of dynamodb-cross-region-library project. and don't have the option to merge it. I don't know why nobody watch these pull requests... For now, I guess you may just copy and past to use it... |
Thanks for this fix, @pir-dsl. FYI I am seeing this error in connectors.log when using this fork. It may result in data loss during replication:
|
This fix worked for me locally. |
@snkinard that error looks to me a pure data issue, see this line as mentioned in the thread, json just takes number, String, array, object, 'true', 'false' or 'null' so a character like '<' is not going to be parsed correctly. |
I gotta say, this worked for me too. I can't quite find the metrics in cloudwatch, but that is most likely user error on my end... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pressed the trigger too fast, here are the comments
@@ -81,6 +81,22 @@ | |||
<!-- Libraries --> | |||
<dependencies> | |||
<dependency> | |||
<groupId>com.fasterxml.jackson.core</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove the jackson dependencies as you do not appear to use them in your code change below?
import com.amazonaws.services.dynamodbv2.model.Record; | ||
import com.amazonaws.services.dynamodbv2.model.UpdateItemRequest; | ||
import com.amazonaws.services.dynamodbv2.model.UpdateItemResult; | ||
import com.amazonaws.services.dynamodbv2.model.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catch-all imports may make the fat JAR bigger. Can you stick with the existing list of imported classes?
import java.util.Collections; | ||
import java.util.Date; | ||
import java.util.List; | ||
import java.util.concurrent.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like these import are not being used. can you remove them?
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am not sure why jackson-core is required?
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is jackson-annotations necessary?
@@ -81,6 +81,22 @@ | |||
<!-- Libraries --> | |||
<dependencies> | |||
<dependency> | |||
<groupId>com.fasterxml.jackson.core</groupId> | |||
<artifactId>jackson-databind</artifactId> | |||
<version>2.8.2</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if jackson-* actually turn out to be necessary, please externalize this version number to a property like jackson.version
The bug fixed in this PR has been fixed in the latest release, 1.2.1. If you still have issues with CloudWatch monitoring, please open an issue. |