How do I connect remotewebdriver for Lambdatest using java?

I am not able to connect to remotewebdriver for Lambdatest using java, it always throws the following exception:

Exception in thread “main” java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.(I)V

at org.apache.http.impl.auth.BasicScheme.authenticate(BasicScheme.java:168)

at org.apache.http.impl.auth.HttpAuthenticator.doAuth(HttpAuthenticator.java:239)

at org.apache.http.impl.auth.HttpAuthenticator.generateAuthResponse(HttpAuthenticator.java:202)

at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:262)

at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)

at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)

Hi Michael,

This happens when the apache-commons dependency is outdated. Please look for a dependency in your pom.xml apache-commons.

You can update the version of the dependency to latest from here: https://mvnrepository.com/artifact/commons-codec/commons-codec

commons-codec commons-codec 1.15

Once the dependency is updated to the latest version, the connection would be successful with the remote webdriver.