java.lang.NullPointerException: attempted to update null

Atlassian JIRA | Ajay Sridhar [Atlassian] | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    As above if Bamboo is unable to persist the buildresultsummary (BAM-2487 is an example of how this might occur) it should not run post-build actions and send out notifications - doing so fails with the exception below {code} 2008-04-15 15:30:42,533 INFO [pool-17-thread-1] [NotificationListener] Failed to send Notifications java.lang.NullPointerException: attempted to update null at net.sf.hibernate.impl.SessionImpl.update(SessionImpl.java:1342) at com.atlassian.bamboo.notification.NotificationListener.handleEvent(NotificationListener.java:86) 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 $Proxy36.handleEvent(Unknown Source) at com.atlassian.event.DefaultEventManager$2.run(DefaultEventManager.java:202) 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) 2008-04-15 15:30:42,534 INFO [pool-14-thread-1] [DashboardCacheListener] event: com.atlassian.bamboo.v2.build.events.PostBuildCompletedEvent[source=com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor@b4bf2a] {code}{code} 2008-04-15 15:30:42,551 INFO [pool-20-thread-1] [DefaultErrorHandler] Recording error: Automatic Favourite Marker custom build complete action failed to run : java.lang.NullPointerException at com.atlassian.bamboo.results.BuildResultsImpl.getCommits(BuildResultsImpl.java:639) at com.atlassian.bamboo.autofavourite.AutoFavouriteBuildCompleteAction.run(AutoFavouriteBuildCompleteAction.java:44) 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.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 $Proxy47.run(Unknown Source) at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performCustomBuildCompleteAction(PostBuildCompletedEventListener.java:68) at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.handleEvent(PostBuildCompletedEventListener.java:41) at com.atlassian.event.DefaultEventManager$2.run(DefaultEventManager.java:202) 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) {code} At the very least Bamboo should, notify the user that the buildresultsummary could not be saved

    Atlassian JIRA | 9 years ago | Ajay Sridhar [Atlassian]
    java.lang.NullPointerException: attempted to update null
  2. 0

    As above if Bamboo is unable to persist the buildresultsummary (BAM-2487 is an example of how this might occur) it should not run post-build actions and send out notifications - doing so fails with the exception below {code} 2008-04-15 15:30:42,533 INFO [pool-17-thread-1] [NotificationListener] Failed to send Notifications java.lang.NullPointerException: attempted to update null at net.sf.hibernate.impl.SessionImpl.update(SessionImpl.java:1342) at com.atlassian.bamboo.notification.NotificationListener.handleEvent(NotificationListener.java:86) 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 $Proxy36.handleEvent(Unknown Source) at com.atlassian.event.DefaultEventManager$2.run(DefaultEventManager.java:202) 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) 2008-04-15 15:30:42,534 INFO [pool-14-thread-1] [DashboardCacheListener] event: com.atlassian.bamboo.v2.build.events.PostBuildCompletedEvent[source=com.atlassian.bamboo.v2.build.agent.LocalBuildResultProcessor@b4bf2a] {code}{code} 2008-04-15 15:30:42,551 INFO [pool-20-thread-1] [DefaultErrorHandler] Recording error: Automatic Favourite Marker custom build complete action failed to run : java.lang.NullPointerException at com.atlassian.bamboo.results.BuildResultsImpl.getCommits(BuildResultsImpl.java:639) at com.atlassian.bamboo.autofavourite.AutoFavouriteBuildCompleteAction.run(AutoFavouriteBuildCompleteAction.java:44) 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.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 $Proxy47.run(Unknown Source) at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.performCustomBuildCompleteAction(PostBuildCompletedEventListener.java:68) at com.atlassian.bamboo.v2.build.events.PostBuildCompletedEventListener.handleEvent(PostBuildCompletedEventListener.java:41) at com.atlassian.event.DefaultEventManager$2.run(DefaultEventManager.java:202) 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) {code} At the very least Bamboo should, notify the user that the buildresultsummary could not be saved

    Atlassian JIRA | 9 years ago | Ajay Sridhar [Atlassian]
    java.lang.NullPointerException: attempted to update null

    Root Cause Analysis

    1. java.lang.NullPointerException

      attempted to update null

      at net.sf.hibernate.impl.SessionImpl.update()
    2. net.sf.hibernate
      SessionImpl.update
      1. net.sf.hibernate.impl.SessionImpl.update(SessionImpl.java:1342)
      1 frame
    3. com.atlassian.bamboo
      NotificationListener.handleEvent
      1. com.atlassian.bamboo.notification.NotificationListener.handleEvent(NotificationListener.java:86)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    6. Hibernate
      HibernateInterceptor.invoke
      1. org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    8. Unknown
      $Proxy36.handleEvent
      1. $Proxy36.handleEvent(Unknown Source)
      1 frame
    9. com.atlassian.event
      DefaultEventManager$2.run
      1. com.atlassian.event.DefaultEventManager$2.run(DefaultEventManager.java:202)
      1 frame
    10. Backport of JSR 166
      ThreadPoolExecutor$Worker.run
      1. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      2. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      2 frames
    11. com.atlassian.bamboo
      NamedThreadFactory$1.run
      1. com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32)
      1 frame
    12. Backport of JSR 166
      ThreadHelpers$1.run
      1. edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34)
      1 frame
    13. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame