Uploaded image for project: 'JIRA Service Desk Server'
  1. JIRA Service Desk Server
  2. JSDSERVER-2238

NullPointerException when ServiceDesk sends Notification Email

    Details

      Description

      Summary

      JIRA Service Desk fails to send E-Mail's to service desk Customers when Service Desk version 2.5.3 is running on JIRA 6.4.1.

      Environment

      This is reproduciable in JIRA instances using JIRA Service Desk who communicate with their customers via E-mail.

      Steps to Reproduce

      1. Create an Update on a JIRA Service Desk Issue that is expected to update a Customer.
      2. Observe an Error is produced in the logs when the E-mail is sent.
      3. The Customer never recieves an E-mail.

      Expected Results

      1. When an update is sent, and an E-mail is to be sent, it should succesessfully send without failure.

      Actual Results

      An Exception is thrown in the atlassian-jira.log

      2015-08-20 10:30:00,000 Sending mailitem com.atlassian.servicedesk.internal.notifications.model.ServiceDeskDeferredMailQueueItem@1a84916f ERROR   Ty.Burrell@modernexample.com  Mail Queue Service [servicedesk.squalor.notifications.EmailContextRunner] Unable to execute callable in empty context
      java.lang.NullPointerException
      	at com.atlassian.jira.plugin.webresource.JiraWebResourceIntegration.getBaseUrl(JiraWebResourceIntegration.java:127)
      	at com.atlassian.plugin.webresource.WebResourceUrlProviderImpl.getBaseUrl(WebResourceUrlProviderImpl.java:103)
      	at sun.reflect.GeneratedMethodAccessor645.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:134)
      	at com.sun.proxy.$Proxy357.getBaseUrl(Unknown Source)  <+2> (DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy4701.getBaseUrl(Unknown Source)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueUrlConverter.getOrCreateIssueUrlCapturingPattern(IssueUrlConverter.java:209)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueUrlConverter.extractIssueUrls(IssueUrlConverter.java:92)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueUrlConverter.replaceIssueUrlsWithPortalRequestUrls(IssueUrlConverter.java:61)
      	at com.atlassian.servicedesk.internal.feature.customer.request.RequestActivityProvider.buildCommentStreamItem(RequestActivityProvider.scala:79)
      	at com.atlassian.servicedesk.internal.feature.customer.request.RequestActivityProvider$$anonfun$7.apply(RequestActivityProvider.scala:165)
      	at com.atlassian.servicedesk.internal.feature.customer.request.RequestActivityProvider$$anonfun$7.apply(RequestActivityProvider.scala:164)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      	at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
      	at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
      	at scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
      	at scala.collection.AbstractTraversable.map(Traversable.scala:105)
      	at com.atlassian.servicedesk.internal.feature.customer.request.RequestActivityProvider.getActivity(RequestActivityProvider.scala:164)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueViewProvider.getIssueViewCommon(IssueViewProvider.scala:162)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueViewProvider.com$atlassian$servicedesk$internal$feature$customer$request$IssueViewProvider$$getIssueView(IssueViewProvider.scala:132)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueViewProvider$$anonfun$getIssueViewOrDefault$1$$anonfun$apply$4.apply(IssueViewProvider.scala:95)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueViewProvider$$anonfun$getIssueViewOrDefault$1$$anonfun$apply$4.apply(IssueViewProvider.scala:93)
      	at scalaz.$bslash$div$class.map(Either.scala:94)
      	at scalaz.$bslash$div$minus.map(Either.scala:283)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueViewProvider$$anonfun$getIssueViewOrDefault$1.apply(IssueViewProvider.scala:93)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueViewProvider$$anonfun$getIssueViewOrDefault$1.apply(IssueViewProvider.scala:92)
      	at scalaz.$bslash$div$class.flatMap(Either.scala:117)
      	at scalaz.$bslash$div$minus.flatMap(Either.scala:283)
      	at com.atlassian.servicedesk.internal.feature.customer.request.IssueViewProvider.getIssueViewOrDefault(IssueViewProvider.scala:92)
      	at com.atlassian.servicedesk.internal.notifications.render.SDIssueNotificationRenderer$$anon$1.call(SDIssueNotificationRenderer.scala:226)
      	at com.atlassian.servicedesk.internal.notifications.render.SDIssueNotificationRenderer$$anon$1.call(SDIssueNotificationRenderer.scala:224)
      	at com.atlassian.servicedesk.squalor.notifications.EmailContextRunner.call(EmailContextRunner.java:36)
      	at com.atlassian.servicedesk.internal.notifications.render.SDIssueNotificationRenderer.com$atlassian$servicedesk$internal$notifications$render$SDIssueNotificationRenderer$$getCustomerRequestView(SDIssueNotificationRenderer.scala:224)
      	at com.atlassian.servicedesk.internal.notifications.render.SDIssueNotificationRenderer$$anonfun$createIssueCommentedNotification$1.apply(SDIssueNotificationRenderer.scala:74)
      	at com.atlassian.servicedesk.internal.notifications.render.SDIssueNotificationRenderer$$anonfun$createIssueCommentedNotification$1.apply(SDIssueNotificationRenderer.scala:73)
      	at com.atlassian.servicedesk.internal.utils.context.AuthenticationContextUtil$.runAsUser(AuthenticationContextUtil.scala:15)
      	at com.atlassian.servicedesk.internal.notifications.render.SDRendererUtils.runAsUser(SDRendererUtils.scala:112)
      	at com.atlassian.servicedesk.internal.notifications.render.SDIssueNotificationRenderer.createIssueCommentedNotification(SDIssueNotificationRenderer.scala:73)
      	at com.atlassian.servicedesk.internal.notifications.ServiceDeskNotificationManager$$anon$2$$anonfun$run$2$$anonfun$apply$3.apply(ServiceDeskNotificationManager.scala:87)
      	at com.atlassian.servicedesk.internal.notifications.ServiceDeskNotificationManager$$anon$2$$anonfun$run$2$$anonfun$apply$3.apply(ServiceDeskNotificationManager.scala:87)
      	at com.atlassian.servicedesk.internal.notifications.ServiceDeskNotificationManager.com$atlassian$servicedesk$internal$notifications$ServiceDeskNotificationManager$$sendNotification(ServiceDeskNotificationManager.scala:256)
      	at com.atlassian.servicedesk.internal.notifications.ServiceDeskNotificationManager$$anon$2$$anonfun$run$2.apply(ServiceDeskNotificationManager.scala:86)
      	at com.atlassian.servicedesk.internal.notifications.ServiceDeskNotificationManager$$anon$2$$anonfun$run$2.apply(ServiceDeskNotificationManager.scala:85)
      	at scala.collection.immutable.List.foreach(List.scala:318)
      	at com.atlassian.servicedesk.internal.notifications.ServiceDeskNotificationManager$$anon$2.run(ServiceDeskNotificationManager.scala:85)
      	at com.atlassian.servicedesk.internal.notifications.model.ServiceDeskDeferredMailQueueItem$$anon$1$$anonfun$run$1.apply$mcV$sp(ServiceDeskDeferredMailQueueItem.scala:53)
      	at com.atlassian.servicedesk.internal.notifications.model.ServiceDeskDeferredMailQueueItem$$anon$1$$anonfun$run$1.apply(ServiceDeskDeferredMailQueueItem.scala:52)
      	at com.atlassian.servicedesk.internal.notifications.model.ServiceDeskDeferredMailQueueItem$$anon$1$$anonfun$run$1.apply(ServiceDeskDeferredMailQueueItem.scala:52)
      	at com.atlassian.servicedesk.internal.utils.context.PortalContextUtil$.inPortalContext(PortalContextUtil.scala:23)
      	at com.atlassian.servicedesk.internal.notifications.model.ServiceDeskDeferredMailQueueItem$$anon$1.run(ServiceDeskDeferredMailQueueItem.scala:52)
      	at com.atlassian.servicedesk.internal.util.SafeRunner$1.call(SafeRunner.java:39)
      	at com.atlassian.servicedesk.internal.util.SafeRunner$1.call(SafeRunner.java:35)
      	at com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock$1.call(LifecycleLock.java:60)
      	at com.atlassian.servicedesk.bootstrap.lifecycle.LifecycleLock$1.call(LifecycleLock.java:47)
      	at com.atlassian.ozymandias.SafePluginPointAccess.call(SafePluginPointAccess.java:263)
      	at com.atlassian.servicedesk.internal.util.SafeRunner.run(SafeRunner.java:44)
      	at com.atlassian.servicedesk.internal.notifications.model.ServiceDeskDeferredMailQueueItem.send(ServiceDeskDeferredMailQueueItem.scala:65)
      	at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:66)
      	at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:57)
      	at com.atlassian.jira.mail.JiraMailQueue$1.apply(JiraMailQueue.java:53)
      	at com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory.runWithStaticBaseUrl(DefaultVelocityRequestContextFactory.java:127)
      	at com.atlassian.jira.util.DefaultBaseUrl.runWithStaticBaseUrl(DefaultBaseUrl.java:58)
      	at com.atlassian.jira.mail.JiraMailQueue.sendBuffer(JiraMailQueue.java:52)
      	at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:30)
      	at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66)
      	at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:76)
      	at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:54)
      	at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:37)
      	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:136)
      	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101)
      	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80)
      	at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
      

      Notes

      We suspect this issue relates to the problems introduced by the bug: JRA-43212.

      Workarounds

      Upgrade JIRA to a more recent version. The problem can not be replicated on the following combinations:

      • JIRA 6.4.10 / JIRA Service Desk 2.5.3
      • JIRA 6.4.1 / JIRA Service Desk 2.5.0.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                majones Matt Jones [Atlassian] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: