You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beginning with 1.10.12 the SNS create topic method throws the following exception:
java.lang.NoSuchFieldError: INSTANCE
at com.amazonaws.http.conn.SdkConnectionKeepAliveStrategy.getKeepAliveDuration(SdkConnectionKeepAliveStrategy.java:48)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:535)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:728)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:489)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:310)
at com.amazonaws.services.sns.AmazonSNSClient.invoke(AmazonSNSClient.java:2459)
at com.amazonaws.services.sns.AmazonSNSClient.createTopic(AmazonSNSClient.java:1133)
at com.amazonaws.services.sns.AmazonSNSClient.createTopic(AmazonSNSClient.java:2135)
...
Reverting back to SDK version <= 1.10.11 fixes the problem.
Code:
Region reg = Region.getRegion(Regions.fromName(region));
InstanceProfileCredentialsProvider cred = new InstanceProfileCredentialsProvider();
sns = new AmazonSNSClient(cred);
CreateTopicResult createTopicResult = sns.createTopic("ses-results"); // Exception starting here
final String sns_arn_topic = createTopicResult.getTopicArn();
The code is pretty straight-forward and reverting back to 1.10.11 works without exception. Any insight would be appreciated.
The text was updated successfully, but these errors were encountered:
What version of the Apache HttpClient are you using? This exception means your version's DefaultConnectionKeepAliveStrategy class is missing the public static INSTANCE member that the SDK started referencing in 1.10.12. As far as I can tell it's been there since 4.3.
@david-at-aws It was a versioning issue. An older HttpClient was getting loaded in a fat jar. Our end is fixed now. Thank you for pointing me in the right location.
Beginning with 1.10.12 the SNS create topic method throws the following exception:
java.lang.NoSuchFieldError: INSTANCE
at com.amazonaws.http.conn.SdkConnectionKeepAliveStrategy.getKeepAliveDuration(SdkConnectionKeepAliveStrategy.java:48)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:535)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:728)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:489)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:310)
at com.amazonaws.services.sns.AmazonSNSClient.invoke(AmazonSNSClient.java:2459)
at com.amazonaws.services.sns.AmazonSNSClient.createTopic(AmazonSNSClient.java:1133)
at com.amazonaws.services.sns.AmazonSNSClient.createTopic(AmazonSNSClient.java:2135)
...
Reverting back to SDK version <= 1.10.11 fixes the problem.
Code:
The code is pretty straight-forward and reverting back to 1.10.11 works without exception. Any insight would be appreciated.
The text was updated successfully, but these errors were encountered: