NPE when Bamboo plugin integrated with Stash using OAuth or Trusted

XMLWordPrintable

      Stash Bamboo plugin requires a basic auth to be setup between Stash and Bamboo but if this is changed to have either OAuth or Trusted application link, the integration fails silently on Stash's side with no build status at all. There are no on-screen errors or indicators.

      Only a message on Bamboo states:

      "For Stash to receive this notification an Application Link is needed between the two systems."

      Knowledge base article for this issue.

      Bamboo logs however report:

      2013-10-10 12:05:02,277 ERROR [AtlassianEvent::0-BAM::EVENTS:pool-2-thread-3] [EventInvokerRunnable] Uncaught exception running event: com.atlassian.bamboo.event.ChainCompletedEvent[source=com.atlassian.bamboo.chains.ChainExecutionManagerImpl@12189646] plan=FP-FP and invoker com.atlassian.event.legacy.LegacyListenerHandler$LegacyListenerInvoker@34f4eb2
      java.lang.NullPointerException
              at com.atlassian.bamboo.stash.StashNotificationRecipient.doRestCallViaApplink(StashNotificationRecipient.java:191)
              at com.atlassian.bamboo.stash.StashNotificationRecipient$1.sendNotification(StashNotificationRecipient.java:149)
              at com.atlassian.bamboo.notification.NotificationDispatcherImpl.dispatchNotifications(NotificationDispatcherImpl.java:60)
              at com.atlassian.bamboo.notification.chain.ChainCompletedNotificationListener.handleEvent(ChainCompletedNotificationListener.java:103)
              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:597)
              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.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at com.sun.proxy.$Proxy291.handleEvent(Unknown Source)
              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:597)
              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 com.sun.proxy.$Proxy292.handleEvent(Unknown Source)
              at com.atlassian.event.legacy.LegacyListenerHandler$LegacyListenerInvoker.invoke(LegacyListenerHandler.java:55)
              at com.atlassian.bamboo.event.spi.EventInvokerRunnable.run(EventInvokerRunnable.java:29)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
              at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:55)
              at java.lang.Thread.run(Thread.java:680)
      

      This exception should be caught and reported with a better message on screen in Stash, rather than thrown in the Bamboo logs with a cryptic error.
      Tested with Stash 2.8.1

            Assignee:
            Unassigned
            Reporter:
            Gurleen Anand
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: