Uploaded image for project: 'JIRA Server (including JIRA Core)'
  1. JIRA Server (including JIRA Core)
  2. JRASERVER-36979

User Directory filter throws a 'value too long' error when Filter exceeds 255 chars



    • Support reference count:
    • Regular Expression:
      value too large for column
    • Symptom Severity:
      Severity 3 - Minor
    • Occurrence Factor:
    • Development Effort:
    • Risk:
    • UIS:


      Steps to Reproduce:

      Create a User Directory with a User/Group filter larger than 255 chars.

      Expected Results:

      JIRA should give an error on the same screen explaining the value is too big

      Actual Results:

      JIRA throws a "We had some technical problems during your last operation.
      We deeply apologize for that " error page with the response from the database

      Request processing failed; nested exception is com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:DirectoryAttribute][directoryId,10001][name,ldap.user.filter][value,(&(objectCategory=Person)(sAMAccountName=*)(|(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)(memberof=cn=lerolero,dc=lero,dc=com)))] (SQL Exception while executing the following:INSERT INTO public.cwd_directory_attribute (directory_id, attribute_name, attribute_value) VALUES (?, ?, ?) (ERROR: value too long for type character varying(255)))


      Note: Before trying these steps, it is very important to both create a backup of your SQL data as well as to then stop Jira before trying these steps. Take a note of the configuration as well as there are multiple cases that have reported that the configuration will be missing after increase the column size.

      It is currently possible to work-around this issue by following the steps in the KB Data truncation due to data too long for column - Atlassian Documentation.

      1. Create a backup of your SQL data in Jira.  Backing up data - Atlassian Documentation has details on how to do this, but Atlassian recommends using the native database backup tools for this instead of relying upon the XML backup.
      2. Stop Jira
      3. You can then run the following SQL commands against the database to change these column sizes (this syntax is correct for postgresql, other versions of SQL might have a different syntax)
        alter table cwd_directory_attribute alter column attribute_value type varchar (400);

        Note: this example expands the column to accept 400 characters in this case. You might need a larger value here should your filter be still greater than this.

      4. Start Jira


          Issue Links



              • Assignee:
                psuwala Piotr Suwala
                malmeida Marcus Silveira
              • Votes:
                70 Vote for this issue
                79 Start watching this issue


                • Created: