LDAP synchronisation failed due to the Adaptavist ScriptRunner bug on Microsoft SQL Server

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

There is a known bug for Adaptavist ScriptRunner plugin and Microsoft SQL server that one of the plugin libraries insert the table 'AO_XXXXXX_SR_USER_PROP' which may block the synchronization from an external directory. In the Confluence application log, we can observe the following trace:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 2020-01-22 13:31:25,646 ERROR [Caesium-1-2] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 4358145 ]. org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:873) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:710) at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:205) at com.sun.proxy.$Proxy75.commit(Unknown Source) ... 2020-01-22 13:31:24,895 WARN [Caesium-1-2] [user.properties.service.UserPropertiesServiceImpl] userRenamedHandler Failed to transfer user properties on user rename 2020-01-22 13:31:25,122 WARN [Caesium-1-2] [user.properties.service.UserPropertiesServiceImpl] userRenamedHandler Failed to transfer user properties on user rename ...

Environment

  • Microsoft SQL Server

  • Adaptavist ScriptRunner version earlier than 5.6.10

  • External directory (e.g. LDAP, JIRA)

Diagnosis

Enable SQL logging in Confluence then perform the sync, we will see the below trace:

1 SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'null.AO_XXXXXX_SR_USER_PROP'

Cause

Solution

Upgrading Adaptavist ScriptRunner plugin server or data center to the latest version.

Other Notes

  • This issue may also affect other Atlassian products

Updated on March 11, 2025

Still need help?

The Atlassian Community is here for you.