# Preparing for Confluence 9.0 - EAP out now

**URL:** <https://community.developer.atlassian.com/t/preparing-for-confluence-9-0-eap-out-now/76160>\
**Category:** Confluence Data Center Announcements\
**Tags:** announcement, platform-7, eap, confluence-data-center, data-center\
**Created:** [January 11, 2024, 10:59pm UTC](https://community.developer.atlassian.com/t/preparing-for-confluence-9-0-eap-out-now/76160 "2024-01-11T22:59:44Z")\
**Posts on this page:** 1\
**Showing post:** 345

<div class="post-metadata">

**Author:** ![clouless](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/clouless/32/49469_2.png) [@clouless](https://community.developer.atlassian.com/u/clouless)\
**Post date:** [June 26, 2024, 10:20am UTC](https://community.developer.atlassian.com/t/preparing-for-confluence-9-0-eap-out-now/76160/345 "2024-06-26T10:20:46Z")

</div>

1️⃣ I cannot get the **`userManager.createUser(...)`** to work with Confluence 9.0-m132.  
Somehow I cannot import and use DefaultUser anymore.

```auto
                        <Import-Package>
                            com.atlassian.sal.*,
                            com.atlassian.user.impl.*,<!-- needed for usermanager.createuser -->
                        </Import-Package>

```

Now I get

```auto
Caused by: org.osgi.framework.BundleException: Unable to resolve io.codeclou.app-confluence-common [298](R 298.0): 
  missing requirement [io.foo.app-confluence-common [298](R 298.0)] 
   osgi.wiring.package; (osgi.wiring.package=com.atlassian.user.impl) 
    Unresolved requirements: [[io.foo.app-confluence-common [298](R 298.0)] 
     osgi.wiring.package; (osgi.wiring.package=com.atlassian.user.impl)]

```

2️⃣ Second is **UserPreferencesAccessor** and **UserAccessor** gets OSGI errors when trying to use it

```auto
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl(requiredType= UserPreferencesAccessor,parent=UsersEndpoint,qualifiers={},position=1,optional=false,self=false,unqualified=null,1108564563)
2. java.lang.IllegalArgumentException: While attempting to resolve the dependencies of io.foo.app.confluence.common.rest.UsersEndpoint errors were found
3. java.lang.IllegalStateException: Unable to perform operation: resolve on io.foo.app.confluence.common.rest.UsersEndpoint

```

I do with Spring Java Config

```auto
    @Bean
    public UserPreferencesAccessor initUserPreferencesAccessor() {
        return importOsgiService(UserPreferencesAccessor);
    }

```

* * *

ℹ **UPDATE 2024-07-01** : With Confluence 9.0-beta2 the app starts again and can access the UserAccessor. **BUT ⚡ it is marked as deprecated** =\> ❓ What is the right Class to use to get/set UserPreferences then? I use currently:

```auto
User foundUser = userManager.getUser(userName);
ConfluenceUserPreferences prefs = userAccessor.getConfluenceUserPreferences(foundUser);
prefs.setString(UserPreferencesKeys.PROPERTY_USER_LOCALE, localePayload.getLocale());

```

ℹ **UPDATE 2024-07-02** : ✅ Using **UserPreferencesAccessor** instead of **UserAccessor** works with Confluence 9.0-beta2. No deprecation warnings anymore.

---

_[View the full topic](https://community.developer.atlassian.com/t/preparing-for-confluence-9-0-eap-out-now/76160)._
