I am working on maven and spring. I have created simple class having main method, to create the OpenTok SessionId but getting exception as follows
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 com.opentok.OpenTok.createSession(OpenTok.java:306) at webapp.test.com.OpenToks.main(OpenTokProg.java:28)
My code is inside main method
OpenTok opentok = new OpenTok(API_KEY,API_SECRET);
String sessionId = opentok.createSession().getSessionId();
I having tried following steps -- got from "forums.tokbox.com/supported-server-api/exception-while-getting-session-object-in-java-t46638#p60778"
1) Make sure that you successfully build path for java server sdk. --> used in pom.xml
<dependency>
<groupId>com.tokbox</groupId>
<artifactId>opentok-server-sdk</artifactId>
<version>2.3.2</version>
</dependency>
2) Try using hard coded API key and secret key (for testing purpose)at the time you making object of Opentok. --> tried again same error
3) Make sure you have an access to Opentok server, run a diagnose over this link. http://tokbox.com/tools/connectivity/ --> getting Message: Successful for all connections
Please help