Clicking Edit in a User directory configuration causes System Error in Confluence

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Problem

While trying to configure user repository from the user directory, any changes resulted in 500 error page

The following appears in the atlassian-confluence.log

1 2 3 4 5 6 Caused by: org.springframework.beans.FatalBeanException: Could not copy properties from source to target; nested exception is java.lang.reflect.InvocationTargetException at org.springframework.beans.BeanUtils.copyProperties(BeanUtils.java:591) ... Caused by: java.lang.reflect.InvocationTargetException ... Caused by: java.lang.NumberFormatException: For input string: "636/"

Diagnosis

Diagnostic Steps

  • The string For input string: "636/" looks like a port number

  • Check what is the URL of the LDAP if it contains a backlash:

    1 ldap.url: ldaps://mycompanyLDAP.com:636/

Cause

The backlash in the URL caused this problem.

Solution

Workaround

In your database, run the following query:

1 select d.id, d.directory_name, m.list_index from cwd_directory d join cwd_app_dir_mapping m on d.id=m.directory_id;

Take note of the id of the problematic directory, and insert it to the following code and run it in your database:

1 2 3 4 UPDATE cwd_directory_attribute SET attribute_value = 'ldap://10.60.2.50:10390' <without the backlash> WHERE directory_id = <directory ID obtained form the previous query> AND attribute_name = 'ldap.url'

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Check if the codes above was run successfully by running the following code:

1 SELECT * FROM cwd_directory_attribute WHERE directory_id = <directory id> AND attribute_name = 'ldap.url';

flush your cache (By going to Confluence Admin > Cache Management > Flush All) and see if this setting works

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.