SDK library - com.okta.sdk.impl.client.BaseClient

Hi there, I am writing a simple java program to Authenticate to OKTA using the authn sdk. Seems that the libraries I am using is missing the above class. Here are my maven deps:
import com.okta.authn.sdk.AuthenticationException;
import com.okta.authn.sdk.AuthenticationStateHandler;
import com.okta.authn.sdk.client.AuthenticationClient;
import com.okta.authn.sdk.client.AuthenticationClients;
import com.okta.authn.sdk.resource.AuthenticationResponse;

com.okta.sdk okta-sdk-api 10.2.1 com.okta.sdk okta-sdk-impl 10.2.1 runtime com.okta.authn.sdk okta-authn-sdk-api 2.0.10 com.okta.authn.sdk okta-authn-sdk-impl 2.0.10 runtime com.okta.commons okta-http-httpclient 1.3.4 runtime

Exception in thread “main” java.lang.NoClassDefFoundError: com/okta/sdk/impl/client/BaseClient

Appreciate any help.

Hello,

For the Okta Java Management SDK there has been a major change in the SDK between 8.x and 10.x versions.
The Latest Java Auth SDK 2.0.10 relies on Management SDK 8.2.3, see here.

The 8.x branch of the Management SDK contains BaseClient,

The new 10.x branch does not,

For now I would recommend using the Mgmt 8.2.3 which 2.0.10 relies on.

If you want to use the new Mgmt 10.x SDK with Auth I suggest updating/follow this Issue.

Thank You,

2 Likes