opentok / Opentok-Java-SDK

OpenTok Server SDK for Java
https://tokbox.com/developer
MIT License
27 stars 64 forks source link

Can't use sdk #79

Closed mikebell90 closed 9 years ago

mikebell90 commented 9 years ago

Created a simple maven projection, only dependency is 2.3.1 tokbox

4.0.0 speakeasy testtokbox 0.0.1-SNAPSHOT tokboxtest com.tokbox opentok-server-sdk 2.3.1

Wrote a simple bit of code to initialize tokbox, and then generate tokens and sessinos

and get

Exception in thread "main" java.lang.NoSuchMethodError: com.ning.http.client.AsyncHttpClient$BoundRequestBuilder.setParameters(Lcom/ning/http/client/FluentStringsMap;)Lcom/ning/http/client/AsyncHttpClient$BoundRequestBuilder; at com.opentok.util.HttpClient.createSession(HttpClient.java:48) at com.opentok.OpenTok.createSession(OpenTok.java:252) at TokBoxUtil.createSession(TokBoxUtil.java:24) at TokBoxUtil.main(TokBoxUtil.java:46)

mikebell90 commented 9 years ago

This ends up loading async client 1.9.x which is still not compatible with the publishd 2.3.1 ?

mikebell90 commented 9 years ago

A forced import of 1.8.16 worked.

aoberoi commented 9 years ago

thanks @mikebell90 for debugging the issue and for updating the ticket.

this is related to #75. its clear that the version specifier needs to be updated, but the question is whether picking something that is 1.8.x or 1.9.x is better. obviously for new projects, 1.9.x makes sense. i'm trying to gather a general sense of if users of this library have other dependencies which actually require 1.8.x so this would cause conflicts. i'm starting to lean towards 1.9.x so that we can at least accommodate new users well and users who have issues will start speaking up. do you have any opinions?

mikebell90 commented 9 years ago

Use 1.9. Use a specific version not a range. Leave it to people subsuming in other projects to change that IMO.