# Using Okta Java SDK and getting IllegalArgumentException

**URL:** <https://devforum.okta.com/t/using-okta-java-sdk-and-getting-illegalargumentexception/14134>\
**Category:** Questions\
**Created:** [May 6, 2021, 10:00pm UTC](https://devforum.okta.com/t/using-okta-java-sdk-and-getting-illegalargumentexception/14134 "2021-05-06T22:00:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![smanzon](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@smanzon](https://devforum.okta.com/u/smanzon)\
**Post date:** [May 6, 2021, 10:00pm UTC](https://devforum.okta.com/t/using-okta-java-sdk-and-getting-illegalargumentexception/14134/1 "2021-05-06T22:00:17Z")

</div>

Hello,

I am trying to use the Okta Java SDK to do management on an Okta instance. The way things are setup right now is that there is a base repo where common operations are made and there is a product repo where these common operations are utilized.

The Okta Java SDK is added as a dependency in the pom file in the base repo. I made a method in the base repo that looks like this:

```
public User getUserByEmail(String email) {
        UserList users = client.listUsers(null, String.format("profile.email eq \"%s\"", email), null, null, null);
        return users.single();
    }

```

When the product repo uses the call getUserByEmail() through the IDE, it works. But when we run the call in a standalone JVM instance, we get the error:

`java.lang.IllegalArgumentException: Could not determine impl for class: 'com.okta.sdk.resource.user.UserList'`

The product repo is also built using maven and is dependent on the base repo.

What are we able to do to fix this issue? Is there a way to properly import the Okta Java SDK to the repo that depends on the impl class?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 8, 2024, 6:00pm UTC](https://devforum.okta.com/t/using-okta-java-sdk-and-getting-illegalargumentexception/14134/2 "2024-02-08T18:00:17Z")

</div>


