I'm sure this question has been asked previously, but I haven't found where, so if someone has the appropriate link, that'd be great :)
We've started seeing emails being sent by JIRA with the subject "An error occurred whilst rendering this message. Please Please contact the administrators, and inform them of this bug." - what does this really mean and what can I do to resolve?
The body of the message then contains a stack trace:
---- 8< ------
Details:
-------
org.apache.velocity.exception.ParseErrorException:
Encountered "<EOF>" at getEncodedBodyFromContent[line 13,
column 5]
Was expecting one of:
"(" ...
<RPAREN>
...
<ESCAPE_DIRECTIVE> ...
<SET_DIRECTIVE> ...
"##" ...
"\\\\" ...
"\\" ...
<TEXT> ...
"*#" ...
"*#" ...
<STRING_LITERAL> ...
<END> ...
<IF_DIRECTIVE> ...
<STOP_DIRECTIVE> ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<WORD> ...
<BRACKETED_WORD> ...
<IDENTIFIER>
...
<DOT> ...
"{" ...
"}" ...
at
org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1203)
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.asPlainText(DefaultVelocityTemplatingEngine.java:91)
at
com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:305)
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:428)
at
com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:141)
at
com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:159)
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)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Precedence: bulk
Auto-Submitted: auto-generated
X-JIRA-FingerPrint: 02f47d60ecfd810cec06f89bfef02c06
---- >8 ----
and the body of the message that it was trying to send.
I have done some changes to templates today, but these messages started to be sent before the JIRA instance was restarted to pick up the template change.
Anyone know where I should start looking to resolve this issue?
Cheers
Phil
You don't always need to restart Jira to pick up template changes - it reads the email templates on demand, and if it hasn't used one for a while, it may have dropped out of the cache, forcing it to re-read the .vm (which you've changed)
I suspect the fact the messages started before you restarted is a bit of a red-herring, and it's actually a consistent problem - you've got a mistake in the .vm you have altered.
I can't make out much of a pattern to be honest - most of the time, you need to restart. But not always. I just work on the assumption that as soon as I change something, what might happen is a grey area until I restart.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Nic. I'll take another look at the changes I made to the templates. I wasn't aware that a restart wasn't needed to pick up the changes, but I guess it is needed to guarantee that the changes are picked up when you expect them to be.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It turns out that there was an error in a template... the difficult bit was identifying the template with the error.
Remembering that the email is built up of a subject and a body, checking the subject template, I found a missing "#end". With hindsight, unsurprisingly, this was after line 13 of that template file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.