org.apache.velocity.exception.MethodInvocationException: Invocation of method 'diff' in class com.atlassian.jira.mail.DiffUtils threw exception java.lang.NullPointerException at getEncodedBodyFromContent[line 6, column 34]

Atlassian JIRA | Nick Mason [Atlassian] | 3 years ago
  1. 0

    [~andreask@atlassian.com] picked up on what was going on here, from his comment on the support case where this was discovered: {quote} * Add a comment with a security level that certain users are allowed to see and other users aren't allowed to see due to the security level (those other users should have permission to browse the issue though!) * Edit that comment and remove the security level. We should now send a notification to all users with browse permission, including the ones that didn't have permission to see the comment previously due to the security level that was set * The null pointer exception occurs I think because we remove the originalcomment from the velocity context for users that didn't have permission previously to see it. When we try to diff the original comment with the new comment for those new users we get a NPE since the original is not provided. {quote} The diff to the previous comment shouldn't occur if there's no original. The stack trace in the logs looks like this: {code:none} 2013-08-07 07:08:13,453 Sending mailitem com.atlassian.jira.mail.IssueMailQueueItem@1675db2[issue=com.atlassian.jira.issue.IssueImpl@e397e9[id=10490,summary=Summary,key=ABC-123,created=2013-06-03 11:07:25.8,updated=2013-08-07 07:06:48.701,assignee=User:2,reporter=sysadmin:2],remoteUser=User:2,notificationType=Current_Reporter,eventTypeId=14,templateId=14] 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(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at com.atlassian.diff.WordLevelDiffer.tokenize(WordLevelDiffer.java:153) at com.atlassian.diff.WordLevelDiffer.diffLine(WordLevelDiffer.java:72) at com.atlassian.diff.DiffViewBean.createWordLevelDiff(DiffViewBean.java:123) at com.atlassian.jira.mail.DiffUtils.diff(DiffUtils.java:23) at sun.reflect.GeneratedMethodAccessor1256.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:381) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:370) at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:30) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) 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 org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.RuntimeInstance.render(RuntimeInstance.java:1277) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1216) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1165) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219) at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyForContent(DefaultVelocityManager.java:86) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplatingEngine.java:157) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:128) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$1.with(DefaultVelocityTemplatingEngine.java:108) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$StringRepresentation.toString(DefaultVelocityTemplatingEngine.java:88) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:104) at com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:307) at com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:337) at com.atlassian.jira.mail.MailingListCompiler.access$400(MailingListCompiler.java:47) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:495) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:465) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendNoLevelsIgnoreGroup(MailingListCompiler.java:445) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendForEvent(MailingListCompiler.java:434) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:140) at com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:149) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:28) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) {code} And the one in the email that arrives: {noformat} An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- org.apache.velocity.exception.MethodInvocationException: Invocation of method 'diff' in class com.atlassian.jira.mail.DiffUtils threw exception java.lang.NullPointerException at getEncodedBodyFromContent[line 6, column 34] 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 org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.RuntimeInstance.render(RuntimeInstance.java:1277) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1216) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1165) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219) at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyForContent(DefaultVelocityManager.java:86) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplatingEngine.java:157) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:128) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$1.with(DefaultVelocityTemplatingEngine.java:108) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$StringRepresentation.toString(DefaultVelocityTemplatingEngine.java:88) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:104) at com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:307) at com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:337) at com.atlassian.jira.mail.MailingListCompiler.access$400(MailingListCompiler.java:47) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:495) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:465) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendNoLevelsIgnoreGroup(MailingListCompiler.java:445) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendForEvent(MailingListCompiler.java:434) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:140) at com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:149) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:28) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at com.atlassian.diff.WordLevelDiffer.tokenize(WordLevelDiffer.java:153) at com.atlassian.diff.WordLevelDiffer.diffLine(WordLevelDiffer.java:72) at com.atlassian.diff.DiffViewBean.createWordLevelDiff(DiffViewBean.java:123) at com.atlassian.jira.mail.DiffUtils.diff(DiffUtils.java:23) at sun.reflect.GeneratedMethodAccessor5065.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:381) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:370) at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:30) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) ... 31 {noformat}

    Atlassian JIRA | 3 years ago | Nick Mason
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'diff' in class com.atlassian.jira.mail.DiffUtils threw exception java.lang.NullPointerException at getEncodedBodyFromContent[line 6, column 34]
  2. 0

    [~andreask@atlassian.com] picked up on what was going on here, from his comment on the support case where this was discovered: {quote} * Add a comment with a security level that certain users are allowed to see and other users aren't allowed to see due to the security level (those other users should have permission to browse the issue though!) * Edit that comment and remove the security level. We should now send a notification to all users with browse permission, including the ones that didn't have permission to see the comment previously due to the security level that was set * The null pointer exception occurs I think because we remove the originalcomment from the velocity context for users that didn't have permission previously to see it. When we try to diff the original comment with the new comment for those new users we get a NPE since the original is not provided. {quote} The diff to the previous comment shouldn't occur if there's no original. The stack trace in the logs looks like this: {code:none} 2013-08-07 07:08:13,453 Sending mailitem com.atlassian.jira.mail.IssueMailQueueItem@1675db2[issue=com.atlassian.jira.issue.IssueImpl@e397e9[id=10490,summary=Summary,key=ABC-123,created=2013-06-03 11:07:25.8,updated=2013-08-07 07:06:48.701,assignee=User:2,reporter=sysadmin:2],remoteUser=User:2,notificationType=Current_Reporter,eventTypeId=14,templateId=14] 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(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at com.atlassian.diff.WordLevelDiffer.tokenize(WordLevelDiffer.java:153) at com.atlassian.diff.WordLevelDiffer.diffLine(WordLevelDiffer.java:72) at com.atlassian.diff.DiffViewBean.createWordLevelDiff(DiffViewBean.java:123) at com.atlassian.jira.mail.DiffUtils.diff(DiffUtils.java:23) at sun.reflect.GeneratedMethodAccessor1256.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:381) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:370) at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:30) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) 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 org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.RuntimeInstance.render(RuntimeInstance.java:1277) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1216) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1165) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219) at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyForContent(DefaultVelocityManager.java:86) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplatingEngine.java:157) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:128) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$1.with(DefaultVelocityTemplatingEngine.java:108) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$StringRepresentation.toString(DefaultVelocityTemplatingEngine.java:88) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:104) at com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:307) at com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:337) at com.atlassian.jira.mail.MailingListCompiler.access$400(MailingListCompiler.java:47) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:495) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:465) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendNoLevelsIgnoreGroup(MailingListCompiler.java:445) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendForEvent(MailingListCompiler.java:434) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:140) at com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:149) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:28) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) {code} And the one in the email that arrives: {noformat} An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- org.apache.velocity.exception.MethodInvocationException: Invocation of method 'diff' in class com.atlassian.jira.mail.DiffUtils threw exception java.lang.NullPointerException at getEncodedBodyFromContent[line 6, column 34] 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 org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.RuntimeInstance.render(RuntimeInstance.java:1277) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1216) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1165) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219) at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyForContent(DefaultVelocityManager.java:86) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplatingEngine.java:157) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:128) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$1.with(DefaultVelocityTemplatingEngine.java:108) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$StringRepresentation.toString(DefaultVelocityTemplatingEngine.java:88) at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:104) at com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:307) at com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:337) at com.atlassian.jira.mail.MailingListCompiler.access$400(MailingListCompiler.java:47) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:495) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:465) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendNoLevelsIgnoreGroup(MailingListCompiler.java:445) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendForEvent(MailingListCompiler.java:434) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:140) at com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:149) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:28) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at com.atlassian.diff.WordLevelDiffer.tokenize(WordLevelDiffer.java:153) at com.atlassian.diff.WordLevelDiffer.diffLine(WordLevelDiffer.java:72) at com.atlassian.diff.DiffViewBean.createWordLevelDiff(DiffViewBean.java:123) at com.atlassian.jira.mail.DiffUtils.diff(DiffUtils.java:23) at sun.reflect.GeneratedMethodAccessor5065.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:381) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:370) at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:30) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) ... 31 {noformat}

    Atlassian JIRA | 3 years ago | Nick Mason [Atlassian]
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'diff' in class com.atlassian.jira.mail.DiffUtils threw exception java.lang.NullPointerException at getEncodedBodyFromContent[line 6, column 34]
  3. 0

    There is a small typo in the Danish Translation ( ']' instead of '}'), that is causing a large error when viewing emails in danish: {code} 2006-05-08 12:32:46,925 ERROR [velocity] Method getText threw exception for reference $i18n in template templates/email/html/includes/footer.vm at [13,11] 2006-05-08 12:32:46,925 ERROR [com.atlassian.velocity.DefaultVelocityManager] Exception getting message body from Velocity: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getText' in class com.atlassian.jira.web.bean.I18nBean threw exception class java.lang.IllegalArgumentException : Unmatched braces in the pattern. org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getText' in class com.atlassian.jira.web.bean.I18nBean threw exception class java.lang.IllegalArgumentException : Unmatched braces in the pattern. at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:246) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.runtime.directive.Parse.render(Parse.java:181) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:316) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:210) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBodyForContent(DefaultVelocityManager.java:137) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:224) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:135) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:110) at com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:167) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:68) at com.atlassian.jira.web.action.admin.MailQueueAdmin.doExecute(MailQueueAdmin.java:38) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:58) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132) at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:534) {code}

    Atlassian JIRA | 1 decade ago | Brian Nguyen (HipChat)
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getText' in class com.atlassian.jira.web.bean.I18nBean threw exception class java.lang.IllegalArgumentException : Unmatched braces in the pattern.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    After editing a comment JIRA sends a notification email message. If the comment was added by a user who exists then the message is as expected. If the comment was added by a user whose account has since been deleted then the message contains the following: {noformat} An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUser' in class com.atlassian.core.user.UserUtils threw exception class com.opensymphony.user.EntityNotFoundException : No user fred.bloggs@xxxxxxxxxxx.co.uk found at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:246) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:327) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:144) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:172) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:316) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:210) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBodyForContent(DefaultVelocityManager.java:142) at com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:285) at com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:41) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:307) at com.atlassian.jira.mail.MailingListCompiler.access$500(MailingListCompiler.java:35) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:472) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:440) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendForEvent(MailingListCompiler.java:393) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:133) at com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:167) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:68) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:23) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:61) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516) {noformat}

    Atlassian JIRA | 8 years ago | John Ball
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUser' in class com.atlassian.core.user.UserUtils threw exception class com.opensymphony.user.EntityNotFoundException : No user fred.bloggs@xxxxxxxxxxx.co.uk found at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:246)
  6. 0

    The below occurred after logging 0m to a task: An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- org.apache.velocity.exception.MethodInvocationException: Invocation of method 'indentToChangelog' in class com.atlassian.jira.util.JiraVelocityHelper threw exception class java.lang.NullPointerException : null at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:246) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:172) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:114) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:316) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:210) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBodyForContent(DefaultVelocityManager.java:142) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:224) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:135) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:88) at com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:167) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:68) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:23) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)

    Atlassian JIRA | 1 decade ago | Whitney Davis
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'indentToChangelog' in class com.atlassian.jira.util.JiraVelocityHelper threw exception class java.lang.NullPointerException : null

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.velocity.exception.MethodInvocationException

      Invocation of method 'diff' in class com.atlassian.jira.mail.DiffUtils threw exception java.lang.NullPointerException at getEncodedBodyFromContent[line 6, column 34]

      at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException()
    2. Apache Velocity
      VelocityEngine.evaluate
      1. org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
      2. org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284)
      3. org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      4. org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
      5. org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
      6. org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
      7. org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      8. org.apache.velocity.runtime.RuntimeInstance.render(RuntimeInstance.java:1277)
      9. org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1216)
      10. org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1165)
      11. org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219)
      11 frames
    3. com.atlassian.velocity
      DefaultVelocityManager.writeEncodedBodyForContent
      1. com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyForContent(DefaultVelocityManager.java:86)
      1 frame
    4. com.atlassian.jira
      IssueMailQueueItem.send
      1. com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplatingEngine.java:157)
      2. com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:128)
      3. com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$1.with(DefaultVelocityTemplatingEngine.java:108)
      4. com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest$StringRepresentation.toString(DefaultVelocityTemplatingEngine.java:88)
      5. com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asPlainText(DefaultVelocityTemplatingEngine.java:104)
      6. com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:307)
      7. com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39)
      8. com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:337)
      9. com.atlassian.jira.mail.MailingListCompiler.access$400(MailingListCompiler.java:47)
      10. com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:495)
      11. com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:465)
      12. com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendNoLevelsIgnoreGroup(MailingListCompiler.java:445)
      13. com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendForEvent(MailingListCompiler.java:434)
      14. com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:140)
      15. com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:149)
      15 frames
    5. com.atlassian.mail
      MailQueueImpl.sendBuffer
      1. com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66)
      1 frame
    6. com.atlassian.jira
      ServiceRunner.execute
      1. com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:28)
      2. com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61)
      3. com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48)
      3 frames
    7. quartz
      JobRunShell.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:195)
      1 frame