Unable to Add a Label to an Attachment

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following appears in the atlassian-confluence.log:

2014-07-04 14:12:16,842 ERROR [http-apr-8080-exec-10] [confluence.ui.rest.LoggingExceptionMapper] toResponse Exception while processing REST request: 
Hibernate operation: could not insert: [com.atlassian.confluence.labels.Labelling#37289987]; SQL []; Column 'CONTENTID' cannot be null;
 nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'CONTENTID' cannot be null

Cause

 In this case, labeling does not mean the label table. It means the content_label table.

Resolution

  • Please ensure that you backup your database before making any modifications

  • Run the following query against the database:

    alter table content_label modify contentid bigint(20) null ;

    (warning) If you are unsure of the database connection parameters, refer to How to find Confluence's database connection parameters.

Last modified on Feb 26, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.