Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-3770

guessChangeSetId returning null will cause emails to throw exceptions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • 2.3
    • 2.3 M2
    • Notifications
    • None

    Description

      If guessChangeSetId is null, you'll get.

      Expression commit.guessChangeSetId() is undefined on line 37, column 30 in notification-templates/BuildCompletedTextEmail.ftl.
      The problematic instruction:
      ----------
      ==> ${commit.guessChangeSetId()} [on line 37, column 28 in notification-templates/BuildCompletedTextEmail.ftl]
      ----------
      
      Java backtrace for programmers:
      ----------
      freemarker.core.InvalidReferenceException: Expression commit.guessChangeSetId() is undefined on line 37, column 30 in notification-templates/BuildCompletedTextEmail.ftl.
      	at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
      	at freemarker.core.Expression.getStringValue(Expression.java:118)
      	at freemarker.core.Expression.getStringValue(Expression.java:93)
      	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
      	at freemarker.core.Environment.visit(Environment.java:208)
      	at freemarker.core.MixedContent.accept(MixedContent.java:92)
      	at freemarker.core.Environment.visit(Environment.java:208)
      	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
      	at freemarker.core.Environment.visit(Environment.java:415)
      	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
      	at freemarker.core.Environment.visit(Environment.java:208)
      	at freemarker.core.MixedContent.accept(MixedContent.java:92)
      	at freemarker.core.Environment.visit(Environment.java:208)
      	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
      	at freemarker.core.Environment.visit(Environment.java:208)
      	at freemarker.core.MixedContent.accept(MixedContent.java:92)
      	at freemarker.core.Environment.visit(Environment.java:208)
      	at freemarker.core.Environment.process(Environment.java:188)
      	at freemarker.template.Template.process(Template.java:237)
      	at com.atlassian.bamboo.ww2.BambooFreemarkerManager.renderPageWithNoContext(BambooFreemarkerManager.java:298)
      	at com.atlassian.bamboo.ww2.BambooFreemarkerManager.renderPage(BambooFreemarkerManager.java:140)
      	at com.atlassian.bamboo.ww2.BambooFreemarkerManager.render(BambooFreemarkerManager.java:188)
      	at com.atlassian.bamboo.notification.buildcompleted.BuildCompletedNotification.getTextEmailContent(BuildCompletedNotification.java:140)
      	at com.atlassian.bamboo.notification.transports.MultipartEmailTransport.sendNotification(MultipartEmailTransport.java:59)
      	at com.atlassian.bamboo.notification.NotificationDispatcher.dispatchNotifications(NotificationDispatcher.java:59)
      	at com.atlassian.bamboo.notification.buildcompleted.BuildCompletedNotificationListener.handleEvent(BuildCompletedNotificationListener.java:89)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:585)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      	at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at $Proxy43.handleEvent(Unknown Source)
      	at com.atlassian.bamboo.event.BambooEventManager$2.run(BambooEventManager.java:46)
      	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      	at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32)
      	at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34)
      	at java.lang.Thread.run(Thread.java:595)
      

      Need to make sure other usages are checked as well

      Attachments

        Activity

          People

            mwent Marek Went (Inactive)
            mark@atlassian.com MarkC
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h