-
Bug
-
Resolution: Fixed
-
High
-
8.1.0
-
8.01
-
1
-
Severity 2 - Major
-
Issue Summary
Batched notification in icelandic language causes Velocity template error which is also included into the notification.
Steps to Reproduce
- Turn on "Batching email notifications" option is enabled (Go to Jira settings > System > Batching notifications)
- As a Jira User A, change profile language to Iceland.
- As User B, leave a number of comments that trigger batched notification to User A
Expected Results
User A receives batched notification that is normally rendered.
Actual Results
User A receives batched notification that contains error and stack trace:
The below exception is thrown in the atlassian-jira.log file:
2019-02-15 16:45:06,308 Caesium-1-4 ERROR anonymous [c.atlassian.velocity.DefaultVelocityManager] Exception getting message body from Velocity: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getText' in class com.atlassian.jira.i18n.BackingI18n threw exception java.lang.IllegalArgumentException: Choice Pattern incorrect: 0#comentarii|1#comentariu1<comentarii at templates/email/batch/html/IssueUpdateBatcher-content.vm[line 204, column 47] org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getText' in class com.atlassian.jira.i18n.BackingI18n threw exception java.lang.IllegalArgumentException: Choice Pattern incorrect: 0#comentarii|1#comentariu1<comentarii at templates/email/batch/html/IssueUpdateBatcher-content.vm[line 204, column 47] 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.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106) 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.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.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.RuntimeInstance.render(RuntimeInstance.java:1276) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1215) at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1164) at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBodyForContent(DefaultVelocityManager.java:205) at com.atlassian.jira.plugins.inform.batching.rendering.VelocityTemplate.render(VelocityTemplate.java:37) at com.atlassian.jira.plugins.inform.batching.rendering.VelocityTemplate.renderContent(VelocityTemplate.java:28) at com.atlassian.jira.plugins.inform.batching.BatcherServiceImpl.createEmail(BatcherServiceImpl.java:141) at com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJob.lambda$processEventBatch$3(BatchNotificationJob.java:162) at com.atlassian.jira.plugins.inform.performance.MeasurementProducer$MeasureWorkerBuilder$1.measure(MeasurementProducer.java:48) at com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJob.processEventBatch(BatchNotificationJob.java:136) at com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJob.lambda$notifyUsers$1(BatchNotificationJob.java:114) at com.atlassian.jira.plugins.inform.performance.MeasurementProducer$MeasureWorkerBuilder$1.measure(MeasurementProducer.java:48) at com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJob.notifyUsers(BatchNotificationJob.java:108) at com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJob.lambda$runJob$0(BatchNotificationJob.java:86) at com.atlassian.jira.plugins.inform.performance.MeasurementProducer$MeasureWorkerBuilder$1.measure(MeasurementProducer.java:48) at com.atlassian.jira.plugins.inform.batching.cron.BatchNotificationJob.runJob(BatchNotificationJob.java:84) at com.atlassian.jira.plugins.inform.batching.cron.ConditionalJobRunner.runJob(ConditionalJobRunner.java:33) at com.atlassian.jira.plugins.inform.batching.cron.ConditionalJobRunner.runJob(ConditionalJobRunner.java:33) at com.atlassian.jira.plugins.inform.batching.cron.OncePerClusterJobRunner.runJob(OncePerClusterJobRunner.java:46) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:134) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:106) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:90) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:435) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:430) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJobWithRecoveryGuard(CaesiumSchedulerService.java:454) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:382) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:66) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:60) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:35) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalArgumentException: Choice Pattern incorrect: 0#comentarii|1#comentariu1<comentarii at java.text.MessageFormat.makeFormat(MessageFormat.java:1519) at java.text.MessageFormat.applyPattern(MessageFormat.java:479) at java.text.MessageFormat.<init>(MessageFormat.java:380) at com.atlassian.jira.i18n.BackingI18n.formatI18nMsg(BackingI18n.java:244) at com.atlassian.jira.i18n.BackingI18n.getText(BackingI18n.java:222) ... 1 filtered at java.lang.reflect.Method.invoke(Method.java:498) 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.AnnotationBoxingMethod.invoke(AnnotationBoxingMethod.java:24) at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:28) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) ... 45 more Caused by: java.lang.IllegalArgumentException at java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:202) at java.text.ChoiceFormat.<init>(ChoiceFormat.java:315) at java.text.MessageFormat.makeFormat(MessageFormat.java:1516) ... 57 more
Workaround
- Change profile language to other language (e.g. English)
- Turn off "Batching email notifications" feature
- is cloned from
-
JRASERVER-68890 Batched notification in Romanian language causes Velocity template error which is also included into notification
-
- Closed
-
- relates to
-
JRASERVER-69170 Batched notification in Chinese language causes Velocity template error which is also included into notification
-
- Closed
-