java.lang.NullPointerException

Atlassian JIRA | Matt Jones [Atlassian] | 1 year ago
  1. 0

    h3. 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. h3. Environment This is reproduciable in JIRA instances using JIRA Service Desk who communicate with their customers via E-mail. h3. Steps to Reproduce # Create an Update on a JIRA Service Desk Issue that is expected to update a Customer. # Observe an Error is produced in the logs when the E-mail is sent. # The Customer never recieves an E-mail. h3. Expected Results # When an update is sent, and an E-mail is to be sent, it should succesessfully send without failure. h3. Actual Results An Exception is thrown in the {{atlassian-jira.log}} {code} 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) {code} h3. Notes We suspect this issue relates to the problems introduced by the bug: [JRA-43212|https://jira.atlassian.com/browse/JRA-43212]. h3. 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.

    Atlassian JIRA | 1 year ago | Matt Jones [Atlassian]
    java.lang.NullPointerException
  2. 0

    h3. 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. h3. Environment This is reproduciable in JIRA instances using JIRA Service Desk who communicate with their customers via E-mail. h3. Steps to Reproduce # Create an Update on a JIRA Service Desk Issue that is expected to update a Customer. # Observe an Error is produced in the logs when the E-mail is sent. # The Customer never recieves an E-mail. h3. Expected Results # When an update is sent, and an E-mail is to be sent, it should succesessfully send without failure. h3. Actual Results An Exception is thrown in the {{atlassian-jira.log}} {code} 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) {code} h3. Notes We suspect this issue relates to the problems introduced by the bug: [JRA-43212|https://jira.atlassian.com/browse/JRA-43212]. h3. 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.

    Atlassian JIRA | 1 year ago | Matt Jones [Atlassian]
    java.lang.NullPointerException
  3. 0

    A NullPointerException occurs when running tasks on non-HTTP-executor-threads (ie. Quartz jobs or background tasks) that make calls to JiraWebResourceIntegrartion#getBaseUrl where urlMode = UrlMode.RELATIVE. This execution path worked fine in 6.3, so this is a regression in 6.4: {code} java.lang.NullPointerException at com.atlassian.jira.plugin.webresource.JiraWebResourceIntegration.getBaseUrl(JiraWebResourceIntegration.java:127) at com.atlassian.plugin.webresource.WebResourceUrlProviderImpl.getStaticResourcePrefix(WebResourceUrlProviderImpl.java:47) at com.atlassian.jira.plugin.webresource.JiraWebResourceUrlProvider.getStaticResourcePrefix(JiraWebResourceUrlProvider.java:44) {code} This bug hit one of our plugins because we were calling JiraWebResourceUrlProvider#getStaticResourcePrefix, but we were able to work around that specific instance by using UrlMode.AUTO instead. However, this bug causes another problem with no easy workaround. If a task also needs to grab a DownloadableResource from a non-HTTP-executor thread, the following exception occurs because JIRA's RelativeUrlTransformerFactory#createUrlPrefixRef method uses a hardcoded "UrlMode.RELATIVE" and there is no option to override it: {code} Caused by: java.lang.NullPointerException at com.atlassian.jira.plugin.webresource.JiraWebResourceIntegration.getBaseUrl(JiraWebResourceIntegration.java:127) at com.atlassian.plugin.webresource.WebResourceUrlProviderImpl.getStaticResourcePrefix(WebResourceUrlProviderImpl.java:47) at com.atlassian.jira.plugin.webresource.JiraWebResourceUrlProvider.getStaticResourcePrefix(JiraWebResourceUrlProvider.java:44) at com.atlassian.plugin.webresource.transformer.instance.RelativeUrlTransformerFactory$RelativeUrlTransformer$2.create(RelativeUrlTransformerFactory.java:119) at com.atlassian.plugin.webresource.transformer.instance.RelativeUrlTransformerFactory$RelativeUrlTransformer$2.create(RelativeUrlTransformerFactory.java:110) at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143) ... 36 more {code} The regression stems from this specific code in JiraWebResourceIntegration#getBaseUrl: {code} public String getBaseUrl(final UrlMode urlMode) { switch (urlMode) { case RELATIVE: return ExecutingHttpRequest.get().getContextPath(); case AUTO: // This may return a canonical URL, depending on the type of request being handled. return requestContextFactory.getJiraVelocityRequestContext().getBaseUrl(); case ABSOLUTE: return requestContextFactory.getJiraVelocityRequestContext().getCanonicalBaseUrl(); default: throw new AssertionError("Unsupported URLMode: " + urlMode); } } {code} urlMode is relative, so "ExecutingHttpRequest.get()" presumably returns null when not run on an HTTP-executor thread. In 6.3, this code instead looked like this and it worked properly: {code} 99 public String getBaseUrl(final UrlMode urlMode) 100 { 101 switch (urlMode) 102 { 103 case RELATIVE: 104 case AUTO: 105 return requestContextFactory.getJiraVelocityRequestContext().getBaseUrl(); 106 case ABSOLUTE: 107 return requestContextFactory.getJiraVelocityRequestContext().getCanonicalBaseUrl(); 108 default: 109 throw new AssertionError("Unsupported URLMode: " + urlMode); 110 } 111 } {code}

    Atlassian JIRA | 2 years ago | Scott Dudley [Arsenale]
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    A NullPointerException occurs when running tasks on non-HTTP-executor-threads (ie. Quartz jobs or background tasks) that make calls to JiraWebResourceIntegrartion#getBaseUrl where urlMode = UrlMode.RELATIVE. This execution path worked fine in 6.3, so this is a regression in 6.4: {code} java.lang.NullPointerException at com.atlassian.jira.plugin.webresource.JiraWebResourceIntegration.getBaseUrl(JiraWebResourceIntegration.java:127) at com.atlassian.plugin.webresource.WebResourceUrlProviderImpl.getStaticResourcePrefix(WebResourceUrlProviderImpl.java:47) at com.atlassian.jira.plugin.webresource.JiraWebResourceUrlProvider.getStaticResourcePrefix(JiraWebResourceUrlProvider.java:44) {code} This bug hit one of our plugins because we were calling JiraWebResourceUrlProvider#getStaticResourcePrefix, but we were able to work around that specific instance by using UrlMode.AUTO instead. However, this bug causes another problem with no easy workaround. If a task also needs to grab a DownloadableResource from a non-HTTP-executor thread, the following exception occurs because JIRA's RelativeUrlTransformerFactory#createUrlPrefixRef method uses a hardcoded "UrlMode.RELATIVE" and there is no option to override it: {code} Caused by: java.lang.NullPointerException at com.atlassian.jira.plugin.webresource.JiraWebResourceIntegration.getBaseUrl(JiraWebResourceIntegration.java:127) at com.atlassian.plugin.webresource.WebResourceUrlProviderImpl.getStaticResourcePrefix(WebResourceUrlProviderImpl.java:47) at com.atlassian.jira.plugin.webresource.JiraWebResourceUrlProvider.getStaticResourcePrefix(JiraWebResourceUrlProvider.java:44) at com.atlassian.plugin.webresource.transformer.instance.RelativeUrlTransformerFactory$RelativeUrlTransformer$2.create(RelativeUrlTransformerFactory.java:119) at com.atlassian.plugin.webresource.transformer.instance.RelativeUrlTransformerFactory$RelativeUrlTransformer$2.create(RelativeUrlTransformerFactory.java:110) at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:325) at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143) ... 36 more {code} The regression stems from this specific code in JiraWebResourceIntegration#getBaseUrl: {code} public String getBaseUrl(final UrlMode urlMode) { switch (urlMode) { case RELATIVE: return ExecutingHttpRequest.get().getContextPath(); case AUTO: // This may return a canonical URL, depending on the type of request being handled. return requestContextFactory.getJiraVelocityRequestContext().getBaseUrl(); case ABSOLUTE: return requestContextFactory.getJiraVelocityRequestContext().getCanonicalBaseUrl(); default: throw new AssertionError("Unsupported URLMode: " + urlMode); } } {code} urlMode is relative, so "ExecutingHttpRequest.get()" presumably returns null when not run on an HTTP-executor thread. In 6.3, this code instead looked like this and it worked properly: {code} 99 public String getBaseUrl(final UrlMode urlMode) 100 { 101 switch (urlMode) 102 { 103 case RELATIVE: 104 case AUTO: 105 return requestContextFactory.getJiraVelocityRequestContext().getBaseUrl(); 106 case ABSOLUTE: 107 return requestContextFactory.getJiraVelocityRequestContext().getCanonicalBaseUrl(); 108 default: 109 throw new AssertionError("Unsupported URLMode: " + urlMode); 110 } 111 } {code}

    Atlassian JIRA | 2 years ago | Scott Dudley [Arsenale]
    java.lang.NullPointerException
  6. 0

    Stack overflow occurs when starting JIRA. Here's my reproduction: {code} 2007-02-02 12:56:17,672 Main Thread FATAL [atlassian.jira.upgrade.ConsistencyLauncher] Not initializing JIRA, the database has been locked. 2007-02-02 12:56:17,672 Main Thread FATAL [atlassian.jira.upgrade.UpgradeLauncher] Skipping, database is locked. 2007-02-02 12:56:17,672 Main Thread FATAL [atlassian.jira.scheduler.JiraSchedulerLauncher] Skipping scheduler initialisation, database is locked. [Filter: profiling] Using parameter [jira_profile] [Filter: profiling] defaulting to off [autostart=false] [Filter: profiling] Turning filter off [jira_profile=off] 2007-02-02 12:56:18,750 Main Thread WARN [jira.config.properties.ApplicationPropertiesImpl] unable to get a PropertiesManager! 2007-02-02 12:56:18,766 Main Thread [webwork.dispatcher.ServletDispatcher] ****************************************************** JIRA is unable to start, the database has been locked. ****************************************************** <2/02/2007 12:56:19 PM EST> <Warning> <WebLogicServer> <BEA-000372> <HostName: 0.0.0.0, maps to multiple IP addresses:192.168.0.168,192.168.133.1,192. 168.118.1> <2/02/2007 12:56:19 PM EST> <Notice> <WebLogicServer> <BEA-000355> <Thread "ListenThread.Default" listening on port 7001, ip address *.*> <2/02/2007 12:56:19 PM EST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "jira" for domain "mydomain" running in Development Mode> <2/02/2007 12:56:19 PM EST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode> <2/02/2007 12:57:16 PM EST> <Error> <HTTP> <BEA-101020> <[ServletContext(id=4935587,name=atlassian-jira-3.7.2-oracle-weblogic,context-path=/jira)] Ser vlet failed with Exception java.lang.StackOverflowError at java.lang.String.<init>([CII)V(Unknown Source) at weblogic.utils.io.FilenameEncoder.resolveRelativePath(FilenameEncoder.java:306) at weblogic.utils.io.FilenameEncoder.resolveRelativeURIPath(FilenameEncoder.java:244) at weblogic.servlet.internal.ServletRequestImpl.getRequestDispatcher(ServletRequestImpl.java:1107) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:652) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:652) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:652) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:652) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:652) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:652) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:431) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) > <2/02/2007 12:57:23 PM EST> <Error> <Kernel> <BEA-000802> <ExecuteRequest failed java.lang.NullPointerException. java.lang.NullPointerException at com.atlassian.jira.plugin.webresource.JiraWebResourceIntegration.getBaseUrl(JiraWebResourceIntegration.java:42) at com.atlassian.plugin.webresource.WebResourceManagerImpl.getStaticResourcePrefix(WebResourceManagerImpl.java:182) at jsp_servlet.__500page._jspService(__500page.java:534) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:330) at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:548) at weblogic.servlet.internal.WebAppServletContext.handleException(WebAppServletContext.java:4203) at weblogic.servlet.internal.WebAppServletContext.handleThrowableFromInvocation(WebAppServletContext.java:3981) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3918) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) > {code} Here's one customer's ([JSP-9844|https://support.atlassian.com/browse/JSP-9844]): {code} ####<Jan 29, 2007 3:36:31 PM PST> <Error> <HTTP> <usto-dapp-lnx02.amgen.com> <bisLWST7315> <ExecuteThread: '13' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-101020> <[ServletContext(id=28798305,name=lwst-jira,context-path=/lwst-jira)] Servlet failed with Exception java.lang.StackOverflowError at weblogic.servlet.utils.URLMatchMap.hashPath(URLMatchMap.java:398) at weblogic.servlet.utils.URLMatchMap.getByPath(URLMatchMap.java:282) at weblogic.servlet.utils.URLMatchMap.get(URLMatchMap.java:271) at weblogic.servlet.internal.WebAppServletContext.resolveRequest(WebAppServletContext.java:4276) at weblogic.servlet.internal.WebAppServletContext.resolveIncludedRequest(WebAppServletContext.java:4206) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:615) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) ... {code} And another ([JSP-9914|https://support.atlassian.com/browse/JSP-9914]): {code} ####<31-Jan-2007 16:48:01 o'clock CET> <Error> <HTTP> <itux06-1> <wlsd_JRCD_03> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170258481444> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@121c5df - appName: 'atlassian-jira-3', name: 'atlassian-jira-3.7.2.war', context-path: '/jira'] Servlet failed with Exception java.lang.StackOverflowError at java.lang.Character.toUpperCase(Character.java:4307) at java.lang.Character.toUpperCase(Character.java:4274) at java.lang.String.regionMatches(String.java:1214) at java.lang.String.equalsIgnoreCase(String.java:950) at weblogic.utils.http.BytesToString.is8BitUnicodeSubset(BytesToString.java:23) at weblogic.servlet.internal.ResponseHeaders.setEncoding(ResponseHeaders.java:417) at weblogic.servlet.internal.ResponseHeaders.<init>(ResponseHeaders.java:124) at weblogic.servlet.internal.ServletResponseImpl.<init>(ServletResponseImpl.java:120) at weblogic.servlet.internal.NestedServletResponse.<init>(NestedServletResponse.java:21) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:421) at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:33) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)* {code}

    Atlassian JIRA | 10 years ago | Tim Pettersen [Atlassian]
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.jira.plugin.webresource.JiraWebResourceIntegration.getBaseUrl()
    2. com.atlassian.jira
      JiraWebResourceIntegration.getBaseUrl
      1. com.atlassian.jira.plugin.webresource.JiraWebResourceIntegration.getBaseUrl(JiraWebResourceIntegration.java:127)
      1 frame
    3. com.atlassian.plugin
      WebResourceUrlProviderImpl.getBaseUrl
      1. com.atlassian.plugin.webresource.WebResourceUrlProviderImpl.getBaseUrl(WebResourceUrlProviderImpl.java:103)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor645.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:497)
      3 frames
    5. com.atlassian.plugin
      DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke
      1. com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:134)
      1 frame