Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-42614

Transitioning issues (adding watchers) fails if the username is longer than 60 characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 6.1.7, 6.3.15, 7.6.6, 7.6.13, 7.12.1, 7.13.3, 8.0.0, 8.2.1, 8.3.4, 8.11.0
    • Issue - View Issue

      Issue summary

      Transitioning issues fails if the username is longer than 60 characters

      Steps to reproduce:

      1. Create 80 characters username . For example: 0Kx6MGIjoJrALDzx5DTxcc9GVOUgQ302bw1CDsyXEeJFJPQ8XUjqw3KrXY8AkEpecQvuI7T54Xj6GFJT
      2. Login as the username created in Step 1
      3. Create an issue, the issue will be created successfully
      4. Transition the issue or just add user as a watcher
      5. Error "Data truncation: Data too long for column 'CALLER' at row 1" is thrown and issue is not transited
      6. in JIRA logs, the traces can be found:
        2015-03-24 17:22:36,319 http-bio-9617-exec-5 ERROR 0Kx6MGIjoJrALDzx5DTxcc9GVOUgQ302bw1CDsyXEeJFJPQ8XUjqw3KrXY8AkEpecQvuI7T54Xj6GFJT 1042x373x1 1hfz67n 127.0.0.1 /rest/api/2/issue/DSGTS-1/comment [atlassian.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event 'com.atlassian.jira.event.issue.IssueEvent@3a639b8b[issue=DSGTS-1,comment=com.atlassian.jira.issue.comments.CommentImpl@f6c3a8e4,worklog=<null>,changelog=<null>,eventTypeId=6,sendMail=true,params={eventsource=action, baseurl=http://localhost:9617},subtasksUpdated=false]' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.jira.bc.issue.watcher.AutoWatchService.onIssueEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.atlassian.jira.bc.issue.watcher.AutoWatchService@5e28b175}'.
        java.lang.RuntimeException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,10000][created,2015-03-24 17:22:36.314][associationType,WatchIssue][sourceName,0kx6mgijojraldzx5dtxcc9gvougq302bw1cdsyxeejfjpq8xujqw3krxy8akepecqvui7t54xj6gfjt][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (Data truncation: Data too long for column 'SOURCE_NAME' at row 1))
        	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
        	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)
        	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32)
        	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60)
        ....
        Caused by: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,10000][created,2015-03-24 17:22:36.314][associationType,WatchIssue][sourceName,0kx6mgijojraldzx5dtxcc9gvougq302bw1cdsyxeejfjpq8xujqw3krxy8akepecqvui7t54xj6gfjt][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (Data truncation: Data too long for column 'SOURCE_NAME' at row 1))
        
        ....
        Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:UserAssociation][sinkNodeId,10000][created,2015-03-24 17:22:36.314][associationType,WatchIssue][sourceName,0kx6mgijojraldzx5dtxcc9gvougq302bw1cdsyxeejfjpq8xujqw3krxy8akepecqvui7t54xj6gfjt][sinkNodeEntity,Issue] (SQL Exception while executing the following:INSERT INTO userassociation (SOURCE_NAME, SINK_NODE_ID, SINK_NODE_ENTITY, ASSOCIATION_TYPE, SEQUENCE, CREATED) VALUES (?, ?, ?, ?, ?, ?) (Data truncation: Data too long for column 'SOURCE_NAME' at row 1))
        ...	
        

      Notes

      Renaming the username does not fix the problem.

      Workaround

      PostgreSQL

      alter table userassociation alter column SOURCE_NAME type varchar (255);
      

      MySQL

      alter table userassociation modify SOURCE_NAME varchar(255) COLLATE utf8_bin NOT NULL;
      
      • Always backup your database before modifying you database directly

        1. WorkflowError.png
          WorkflowError.png
          47 kB
        2. UserDetail.png
          UserDetail.png
          47 kB

              Unassigned Unassigned
              jalbion Janet Albion (Inactive)
              Votes:
              48 Vote for this issue
              Watchers:
              43 Start watching this issue

                Created:
                Updated: