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

Exception Notification Email Error when Editing Worklog Comment for Oracle DB

    XMLWordPrintable

Details

    Description

      Steps to Reproduce:

      1. Install JIRA that is connected to ORACLE DB.
      2. Configure Outgoing Mail on the end of the Installation Wizard.
      3. Create a User which have a working email address.
      4. Create a Project and an Issue.
      5. Assign the issue to the recently created user.
      6. Log Work on the issue without any comment.
      7. Wait until the notification is sent out.
      8. After it, edit the Worklog comment and save.
      9. Wait for another notification to sent out to the assignee.

      Expected Result:

      • The Email notification will sent out with content of the edited comment.

      Actual Result:

      • The email notification is filled out with an error.

      Notes:

      • What is shown in the logs:
        2015-03-10 21:43:55,470 Sending mailitem com.atlassian.jira.mail.IssueMailQueueItem@38356b0c[issue=com.atlassian.jira.issue.IssueImpl@7903c214[id=10006,summary=Worklog 1,key=DEMO-7,created=2015-03-10 21:43:02.0,updated=2015-03-10 21:43:55.202,assignee=internal1:1,reporter=admin:1],remoteUser=admin:1,notificationType=Current_Assignee,eventTypeId=15,templateId=15] ERROR ServiceRunner    Mail Queue Service [velocity] Exception rendering #parse(templates/email/html/includes/patterns/worklog-top.vm) at templates/email/macros.vm[line 306, column 9]
        2015-03-10 21:43:55,471 Sending mailitem com.atlassian.jira.mail.IssueMailQueueItem@38356b0c[issue=com.atlassian.jira.issue.IssueImpl@7903c214[id=10006,summary=Worklog 1,key=DEMO-7,created=2015-03-10 21:43:02.0,updated=2015-03-10 21:43:55.202,assignee=internal1:1,reporter=admin:1],remoteUser=admin:1,notificationType=Current_Assignee,eventTypeId=15,templateId=15] ERROR ServiceRunner    Mail Queue Service [velocity] Exception in macro #genericChangelogMailWithWorklog at getEncodedBodyFromContent[line 4, column 1]
        2015-03-10 21:43:55,473 Sending mailitem com.atlassian.jira.mail.IssueMailQueueItem@38356b0c[issue=com.atlassian.jira.issue.IssueImpl@7903c214[id=10006,summary=Worklog 1,key=DEMO-7,created=2015-03-10 21:43:02.0,updated=2015-03-10 21:43:55.202,assignee=internal1:1,reporter=admin:1],remoteUser=admin:1,notificationType=Current_Assignee,eventTypeId=15,templateId=15] ERROR ServiceRunner    Mail Queue Service [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
        java.lang.NullPointerException
        	at java.util.regex.Matcher.getTextLength(Unknown Source)
        	at java.util.regex.Matcher.reset(Unknown Source)
        	at java.util.regex.Matcher.<init>(Unknown Source)
        	at java.util.regex.Pattern.matcher(Unknown Source)
        
        2015-10-27 11:32:40,152 http-bio-8091-exec-79 ERROR username 692x12812362x1 a8x71z 10.101.80.31,127.0.0.1 /secure/UpdateWorklog.jspa [velocity] Exception rendering #parse(templates/email/html/includes/patterns/worklog-top.vm) at templates/email/macros.vm[line 306, column 9]
        2015-10-27 11:32:40,152 http-bio-8091-exec-79 ERROR username 692x12812362x1 a8x71z 10.101.80.31,127.0.0.1 /secure/UpdateWorklog.jspa [velocity] Exception in macro #genericChangelogMailWithWorklog at getEncodedBodyFromContent[line 44, column 1]
        2015-10-27 11:32:40,152 http-bio-8091-exec-79 ERROR username 692x12812362x1 a8x71z 10.101.80.31,127.0.0.1 /secure/UpdateWorklog.jspa [com.atlassian.velocity.DefaultVelocityManager] Exception getting message body from Velocity: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'diff' in  class com.atlassian.jira.mail.DiffUtils threw exception java.lang.NullPointerException at templates/email/html/includes/patterns/worklog-top.vm[line 9, column 46]
        org.apache.velocity.exception.MethodInvocationException: Invocation of method 'diff' in  class com.atlassian.jira.mail.DiffUtils threw exception java.lang.NullPointerException at templates/email/html/includes/patterns/worklog-top.vm[line 9, column 46]
        	at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
        	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
        	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
        	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
        	(...)
        	at java.lang.Thread.run(Thread.java:745)
        Caused by: java.lang.NullPointerException
        	at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
        	at java.util.regex.Matcher.reset(Matcher.java:309)
        	at java.util.regex.Matcher.<init>(Matcher.java:229)
        	at java.util.regex.Pattern.matcher(Pattern.java:1093)
        	at com.atlassian.diff.WordLevelDiffer.tokenize(WordLevelDiffer.java:176)
        	at com.atlassian.diff.DiffViewBean.createWordLevelDiff(DiffViewBean.java:124)
        	at com.atlassian.jira.mail.DiffUtils.diff(DiffUtils.java:23)  <+3> (NativeMethodAccessorImpl.java:62) (DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:497)
        	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385)
        	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374)
        	at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:30)
        	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
        	... 256 more
        
      • not replicable on HSQLDB

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jrahmadiputra Julian (Inactive)
              Votes:
              35 Vote for this issue
              Watchers:
              37 Start watching this issue

              Dates

                Created:
                Updated: