org.apache.velocity.exception.MethodInvocationException: Invocation of method 'printChangelog' in class com.atlassian.jira.util.JiraVelocityHelper threw exception com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid priority name 'Enhancement'. at templates/email/macros.vm[line 40, column 74]

Atlassian JIRA | Bruce Cran | 3 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    A ticket was created with a priority which was later deleted. I edited the ticket to change the priority to one that would exist after the deletion, then deleted the priority. A user reported the following error: {quote} 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 'printChangelog' in class com.atlassian.jira.util.JiraVelocityHelper threw exception com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid priority name 'Enhancement'. at templates/email/macros.vm[line 40, column 74] 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.directive.VelocimacroProxy.render(VelocimacroProxy.java:212) at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) 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.builder.EmailRenderer.renderEmailBody(EmailRenderer.java:117) at com.atlassian.jira.mail.builder.EmailRenderer.render(EmailRenderer.java:165) at com.atlassian.jira.mail.builder.EmailBuilder.renderNow(EmailBuilder.java:162) at com.atlassian.jira.mail.builder.EmailBuilder.renderNowAsQueueItem(EmailBuilder.java:152) at com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:306) at com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:331) at com.atlassian.jira.mail.MailingListCompiler.access$200(MailingListCompiler.java:46) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:454) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:424) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendNoLevelsIgnoreGroup(MailingListCompiler.java:404) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendToAll(MailingListCompiler.java:399) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:144) 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: com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid priority name 'Enhancement'. at com.atlassian.jira.issue.fields.PrioritySystemField.getPriorityTypeIdByName(PrioritySystemField.java:176) at com.atlassian.jira.issue.fields.PrioritySystemField.prettyPrintChangeHistory(PrioritySystemField.java:375) at com.atlassian.jira.util.JiraVelocityHelper.getPrettyFieldString(JiraVelocityHelper.java:275) at com.atlassian.jira.util.JiraVelocityHelper.printChangelog(JiraVelocityHelper.java:184) at sun.reflect.GeneratedMethodAccessor2050.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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) ... 39 more {quote}

    Atlassian JIRA | 3 years ago | Bruce Cran
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'printChangelog' in class com.atlassian.jira.util.JiraVelocityHelper threw exception com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid priority name 'Enhancement'. at templates/email/macros.vm[line 40, column 74]
  2. 0

    A ticket was created with a priority which was later deleted. I edited the ticket to change the priority to one that would exist after the deletion, then deleted the priority. A user reported the following error: {quote} 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 'printChangelog' in class com.atlassian.jira.util.JiraVelocityHelper threw exception com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid priority name 'Enhancement'. at templates/email/macros.vm[line 40, column 74] 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.directive.VelocimacroProxy.render(VelocimacroProxy.java:212) at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) 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.builder.EmailRenderer.renderEmailBody(EmailRenderer.java:117) at com.atlassian.jira.mail.builder.EmailRenderer.render(EmailRenderer.java:165) at com.atlassian.jira.mail.builder.EmailBuilder.renderNow(EmailBuilder.java:162) at com.atlassian.jira.mail.builder.EmailBuilder.renderNowAsQueueItem(EmailBuilder.java:152) at com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:306) at com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39) at com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:331) at com.atlassian.jira.mail.MailingListCompiler.access$200(MailingListCompiler.java:46) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:454) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:424) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendNoLevelsIgnoreGroup(MailingListCompiler.java:404) at com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendToAll(MailingListCompiler.java:399) at com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:144) 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: com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid priority name 'Enhancement'. at com.atlassian.jira.issue.fields.PrioritySystemField.getPriorityTypeIdByName(PrioritySystemField.java:176) at com.atlassian.jira.issue.fields.PrioritySystemField.prettyPrintChangeHistory(PrioritySystemField.java:375) at com.atlassian.jira.util.JiraVelocityHelper.getPrettyFieldString(JiraVelocityHelper.java:275) at com.atlassian.jira.util.JiraVelocityHelper.printChangelog(JiraVelocityHelper.java:184) at sun.reflect.GeneratedMethodAccessor2050.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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) ... 39 more {quote}

    Atlassian JIRA | 3 years ago | Bruce Cran
    org.apache.velocity.exception.MethodInvocationException: Invocation of method 'printChangelog' in class com.atlassian.jira.util.JiraVelocityHelper threw exception com.atlassian.jira.issue.customfields.impl.FieldValidationException: Invalid priority name 'Enhancement'. at templates/email/macros.vm[line 40, column 74]

    Root Cause Analysis

    1. com.atlassian.jira.issue.customfields.impl.FieldValidationException

      Invalid priority name 'Enhancement'.

      at com.atlassian.jira.issue.fields.PrioritySystemField.getPriorityTypeIdByName()
    2. com.atlassian.jira
      JiraVelocityHelper.printChangelog
      1. com.atlassian.jira.issue.fields.PrioritySystemField.getPriorityTypeIdByName(PrioritySystemField.java:176)
      2. com.atlassian.jira.issue.fields.PrioritySystemField.prettyPrintChangeHistory(PrioritySystemField.java:375)
      3. com.atlassian.jira.util.JiraVelocityHelper.getPrettyFieldString(JiraVelocityHelper.java:275)
      4. com.atlassian.jira.util.JiraVelocityHelper.printChangelog(JiraVelocityHelper.java:184)
      4 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor2050.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      3. java.lang.reflect.Method.invoke(Unknown Source)
      3 frames
    4. Apache Velocity
      UberspectImpl$VelMethodImpl.invoke
      1. org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:381)
      2. org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:370)
      2 frames
    5. com.atlassian.velocity
      UnboxingMethod.invoke
      1. com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:30)
      1 frame
    6. Apache Velocity
      VelocityEngine.evaluate
      1. org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
      2. org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
      3. org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
      4. org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      5. org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
      6. org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      7. org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:212)
      8. org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247)
      9. org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
      10. org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
      11. org.apache.velocity.runtime.RuntimeInstance.render(RuntimeInstance.java:1277)
      12. org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1216)
      13. org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1165)
      14. org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219)
      14 frames
    7. com.atlassian.velocity
      DefaultVelocityManager.writeEncodedBodyForContent
      1. com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyForContent(DefaultVelocityManager.java:86)
      1 frame
    8. 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.builder.EmailRenderer.renderEmailBody(EmailRenderer.java:117)
      7. com.atlassian.jira.mail.builder.EmailRenderer.render(EmailRenderer.java:165)
      8. com.atlassian.jira.mail.builder.EmailBuilder.renderNow(EmailBuilder.java:162)
      9. com.atlassian.jira.mail.builder.EmailBuilder.renderNowAsQueueItem(EmailBuilder.java:152)
      10. com.atlassian.jira.mail.MailingListCompiler$1.processRecipient(MailingListCompiler.java:306)
      11. com.atlassian.jira.mail.NotificationRecipientProcessor.process(NotificationRecipientProcessor.java:39)
      12. com.atlassian.jira.mail.MailingListCompiler.addMailsToQueue(MailingListCompiler.java:331)
      13. com.atlassian.jira.mail.MailingListCompiler.access$200(MailingListCompiler.java:46)
      14. com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.addEmailsToQueue(MailingListCompiler.java:454)
      15. com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendLists(MailingListCompiler.java:424)
      16. com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendNoLevelsIgnoreGroup(MailingListCompiler.java:404)
      17. com.atlassian.jira.mail.MailingListCompiler$NotificationCompiler.sendToAll(MailingListCompiler.java:399)
      18. com.atlassian.jira.mail.MailingListCompiler.sendLists(MailingListCompiler.java:144)
      19. com.atlassian.jira.mail.IssueMailQueueItem.send(IssueMailQueueItem.java:149)
      19 frames
    9. com.atlassian.mail
      MailQueueImpl.sendBuffer
      1. com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66)
      1 frame
    10. 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
    11. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:195)
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      2 frames