New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket not created/ NoClassDefFoundError com.amazonaws.util.json.JSONObject #1292
Comments
Hi, these look like two different instances of dependency version mismatches. For the first instance (Socket not created by this factory), please refer to #1032 For the second instance (JSONObject) it sounds like you may have updated your kinesis dependency to 1.11.x but your core dependency is still on 1.10.x; both version need to be 1.11.x as we don't support mixing different versions of the core runtime and client modules. |
I am just using only two dependency in pom amazon-kinesis-client and aws-java-sdk(I am not sure if core is required to mention here.). As 1032 issue ask to upgrade java sdk version to 1.11.95. If I do so my application does not even start it shows NoClassDefFoundError for JSON lib. Do you want me to add core dependency also in my project, Please let me know if I am missing something here. Thanks in advance |
Sorry I was slightly off in the last statement. It looks like your kinesis client is still on 1.10.x and the core is on 1.11.x You don't need to have a dependency on |
As per my requirement I need both the dependency. but If I do the same in spring boot project it shows me socket not created exception. Does SPRING BOOT app is not compatible with aws java sdk 1.10.x ? So the issue I am facing is spring boot require 1.11.x and kinesis require 1.11.0 and my requirement is to create kinesis in java spring boot. |
Okay, I see. Sorry for the confusion; I thought you were using the Kinesis SDK but it sounds like you're using KCL. KCL 1.2.1 looks like it's using 1.9.x of the SDK internally, so again, your other SDK dependencies need to match as well. Are you able to update your KCL dependency? What does your Spring Boot project POM look like? Do you have a direct dependency on the Apache HTTP client? The reason for |
pom.txt |
I am getting error at the point when I call putRecord method of AmazonKinesisClient java.lang.IllegalStateException: Socket not created by this factory |
Can you paste the output of |
hi this is for aws-java-sdk version of 1.11.0 and amazon-kinesis-client 1.2.1. |
Thanks. I'm seeing some odd version in the output:
This says your 1.11.0 of Same for the other dependencies like joda-time and jackson. Also, as I stated earlier, KCL 1.2.1 is built against version 1.9 of the SDK so there's bound to be conflicts if you want to use anything other than 1.9.x of |
Thanks for all your help. No, using 1.2.1 is not an hard requirement. I have tested with above configuration and it is working fine for now. will update if I face some issue. Thanks for all your time. |
Sounds good, I'll go ahead and close this. |
Hi,
I am using kensis in spring boot project.
I am following the issue .. when I use aws-java-sdk version 1.10.x I am getting the following error.
java.lang.IllegalStateException: Socket not created by this factory
If I upgrade to 1.11.x. I am getting an error ofava.lang.NoClassDefFoundError: com/amazonaws/util/json/JSONObject on app startup.
can you please help on what is the right combination for aws-java-sdk and amazon-kinesis-client for an java spring boot app?
The text was updated successfully, but these errors were encountered: