Broken email notification due to corrupted work directory

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The rendering of a notification email is broken and the following or similar stack-trace appears in the body of a JIRA notification email.

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 templates/email/html/includes/fields/worklogchanges.vm[line 44, column 29] 
	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.render(ASTReference.java:342)
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 
	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) 
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 
	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) 
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 
	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) 
	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) 
	at org.apache.velocity.runtime.directive.Parse.render(Parse.java:263) 
	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) 
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 
	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) 
	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.JiraVelocityManager.getEncodedBodyForContent(JiraVelocityManager.java:81) 
	at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asHtml(DefaultVelocityTemplatingEngine.java:112) 
	at com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:312) 
	at com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39) 
	at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:342) 
	at com.atlassian.jira.mail.MailingListCompiler.access$400(MailingListCompiler.java:48) 
	at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:500) 
	at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:470) 
	at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendForEvent(MailingListCompiler.java:423) 
	at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:121) 
	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:47) 
	at org.quartz.core.JobRunShell.run(JobRunShell.java:195) 
	at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) 
	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.GeneratedMethodAccessor1575.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) 
	... 36 more 

Cause

Could be caused by a security level that was removed   JRA-34234 - Getting issue details... STATUS

A work log edit  JRA-42384 - Getting issue details... STATUS

Or other unknown work log related actions.

Resolution

Force re-build the content of the Tomcat's work directory

  1. Shutdown JIRA
  2. Remove the contents of $JIRA-INSTALL/work directory
  3. Restart JIRA.

Last modified on Aug 15, 2016

Was this helpful?

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