Skip to content
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

Algorithmia.client() call fails #12

Open
alfredsteele opened this issue Sep 4, 2017 · 7 comments
Open

Algorithmia.client() call fails #12

alfredsteele opened this issue Sep 4, 2017 · 7 comments

Comments

@alfredsteele
Copy link

I have been unable to connect to Algorithmia after many different attempts. I even created a new key with full access. The call below throws the exception below.

final AlgorithmiaClient client = Algorithmia.client("MY_KEY");

Exception in thread "main" java.lang.NoSuchFieldError: DEFAULT
at org.apache.http.impl.nio.client.HttpAsyncClientBuilder.build(HttpAsyncClientBuilder.java:666)
at com.algorithmia.client.HttpClient.(HttpClient.java:79)
at com.algorithmia.AlgorithmiaClient.(AlgorithmiaClient.java:19)
at com.algorithmia.Algorithmia.client(Algorithmia.java:49)
at com.steele.algorithmia.DataAPI.main(DataAPI.java:19)

@jamesatha
Copy link
Contributor

My current hypothesis is that you have a system setting that isn't playing nicely with the apache http client that we use. The line that I think to blame is this: https://github.com/algorithmiaio/algorithmia-java/blob/master/src/main/java/com/algorithmia/client/HttpClient.java#L78
Do you know what the https.protocols and https.cipherSuites values are for your system properties?

If you are running this from our source, can you try commenting out that line? This is also a new change, so if you go back to version 1.0.12, that should fix it too.

@alfredsteele
Copy link
Author

alfredsteele commented Sep 4, 2017 via email

@jamesatha
Copy link
Contributor

I've looked at the apache http client code and it should work if the two are unset. Was the error exactly the same in each case?

@alfredsteele
Copy link
Author

alfredsteele commented Sep 5, 2017 via email

@platypii
Copy link
Contributor

platypii commented Sep 5, 2017

This appears to be a problem with dependency resolution pulling in different versions of apache http client or its dependencies. @alfredsteele can you send you ivy/maven/gradle/sbt (whichever) file so I can try to repro?

@alfredsteele
Copy link
Author

alfredsteele commented Sep 6, 2017 via email

@kennydaniel
Copy link
Contributor

I don't think the attachment came through, try posting directly on the github website?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants