User Directory synchronization fails in Bamboo Data Center: ORA-00904: "DBMS_LOB"."COMPARE": invalid identifier
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Attempting to synchronize a User Directory in Bamboo Data Center fails, resulting in new groups & users or changes not being synced:
Upon reviewing the logs (<bamboo-home>/logs/atlassian-bamboo.log
), the "ORA-00904: "DBMS_LOB"."COMPARE": invalid identifier" error is present.
Environment
The solution has been validated in Bamboo Data Center 8.0 but may be applicable to other versions.
Diagnosis
The following error can be found in the <bamboo-home>/logs/atlassian-bamboo.log
file.
Caused by: Error : 904, Position : 71, Sql = update BUILDRESULTSUMMARY_CUSTOMDATA set CUSTOM_INFO_VALUE = :1 where dbms_lob.compare(CUSTOM_INFO_VALUE, :2 ) = 0 and CUSTOM_INFO_KEY = 'ManualBuildTriggerReason.userName', OriginalSql = update BUILDRESULTSUMMARY_CUSTOMDATA set CUSTOM_INFO_VALUE = ? where dbms_lob.compare(CUSTOM_INFO_VALUE, ?) = 0 and CUSTOM_INFO_KEY = 'ManualBuildTriggerReason.userName', Error Msg = ORA-00904: "DBMS_LOB"."COMPARE": invalid identifier
New groups and users added to the Active Directory, or any other changes, are not synced to Bamboo Data Center as a result.
Cause
The synchronization fails due to the Oracle user/schema used by Bamboo Data Center not having the necessary execute
privilege on the DBMS_LOB
schema. The absence of this privilege prevents Bamboo from performing certain operations required for the synchronization process. This permission is also a requirement for connecting Bamboo Data Center to an Oracle database, as per the following documentation:
Solution
The solution consists of granting the required database permissions to the database user used by Bamboo Data Center:
Open the
bamboo.cfg.xml
file located in the Bamboo home directory.Check the value of the
<property name="hibernate.connection.username">
to determine which schema Bamboo uses to connect to the Oracle database.Contact your Database Administrator to grant the
execute
permission to the identified user/schema on theDBMS_LOB
package:The following SQL command can be used to grant the permission:
GRANT EXECUTE ON dbms_lob TO <USER>;
Replace
<USER>
with the actual username/schema used by Bamboo.
After the permissions have been updated, attempt to synchronize the user directory again.
Verify that the directory changes reflect in Bamboo.