java.lang.NullPointerException

JFrog JIRA | Alexander Fisher | 6 years ago
  1. 0

    {noformat} Failed to execute the build 'PROJECT-MAVEN3-JOB1-10' java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394) at java.util.Properties.setProperty(Properties.java:143) at org.jfrog.bamboo.builder.ArtifactoryBuildInfoPropertyHelper.addBuilderInfoProperties(ArtifactoryBuildInfoPropertyHelper.java:161) at org.jfrog.bamboo.builder.ArtifactoryBuildInfoPropertyHelper.createFileAndGetPath(ArtifactoryBuildInfoPropertyHelper.java:93) at org.jfrog.bamboo.builder.ArtifactoryMaven3Builder.runBuild(ArtifactoryMaven3Builder.java:452) at com.atlassian.bamboo.builder.AbstractBuilder.executeBuild(AbstractBuilder.java:272) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:85) 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 $Proxy218.call(Unknown Source) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:189) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:90) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:102) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50) at java.lang.Thread.run(Thread.java:619) Failed to execute the build 'PROJECT-MAVEN3-JOB1-10': null {noformat} It appears that ManualBuildTriggerReason.getUserName() is returning null. I'm currently trying the following work-around, but may file a bug at Atlassian. {noformat} --- src/main/java/org/jfrog/bamboo/builder/ArtifactoryBuildInfoPropertyHelper.java (revision 1541) +++ src/main/java/org/jfrog/bamboo/builder/ArtifactoryBuildInfoPropertyHelper.java (working copy) @@ -154,6 +154,11 @@ } else { principal = "auto"; } + if(principal == null) + { + log.error("ManualBuildTriggerReason.getUserName returned null."); + principal = "unknown"; + } addBuildParentProperties(properties, triggerReason); {noformat} Cheers, Alex

    JFrog JIRA | 6 years ago | Alexander Fisher
    java.lang.NullPointerException
  2. 0

    {noformat} Failed to execute the build 'PROJECT-MAVEN3-JOB1-10' java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:394) at java.util.Properties.setProperty(Properties.java:143) at org.jfrog.bamboo.builder.ArtifactoryBuildInfoPropertyHelper.addBuilderInfoProperties(ArtifactoryBuildInfoPropertyHelper.java:161) at org.jfrog.bamboo.builder.ArtifactoryBuildInfoPropertyHelper.createFileAndGetPath(ArtifactoryBuildInfoPropertyHelper.java:93) at org.jfrog.bamboo.builder.ArtifactoryMaven3Builder.runBuild(ArtifactoryMaven3Builder.java:452) at com.atlassian.bamboo.builder.AbstractBuilder.executeBuild(AbstractBuilder.java:272) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:85) 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 $Proxy218.call(Unknown Source) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:189) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:90) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:102) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50) at java.lang.Thread.run(Thread.java:619) Failed to execute the build 'PROJECT-MAVEN3-JOB1-10': null {noformat} It appears that ManualBuildTriggerReason.getUserName() is returning null. I'm currently trying the following work-around, but may file a bug at Atlassian. {noformat} --- src/main/java/org/jfrog/bamboo/builder/ArtifactoryBuildInfoPropertyHelper.java (revision 1541) +++ src/main/java/org/jfrog/bamboo/builder/ArtifactoryBuildInfoPropertyHelper.java (working copy) @@ -154,6 +154,11 @@ } else { principal = "auto"; } + if(principal == null) + { + log.error("ManualBuildTriggerReason.getUserName returned null."); + principal = "unknown"; + } addBuildParentProperties(properties, triggerReason); {noformat} Cheers, Alex

    JFrog JIRA | 6 years ago | Alexander Fisher
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    NPE when starting up in environment without configuration

    GitHub | 4 years ago | artdaw
    java.lang.NullPointerException
  5. 0

    Custom Ivy Resolver throws NullPointer Exception in Grails

    Stack Overflow | 3 years ago | jonnybot
    java.lang.NullPointerException

    9 unregistered visitors
    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 java.util.Hashtable.put()
    2. Java RT
      Properties.setProperty
      1. java.util.Hashtable.put(Hashtable.java:394)
      2. java.util.Properties.setProperty(Properties.java:143)
      2 frames
    3. org.jfrog.bamboo
      ArtifactoryMaven3Builder.runBuild
      1. org.jfrog.bamboo.builder.ArtifactoryBuildInfoPropertyHelper.addBuilderInfoProperties(ArtifactoryBuildInfoPropertyHelper.java:161)
      2. org.jfrog.bamboo.builder.ArtifactoryBuildInfoPropertyHelper.createFileAndGetPath(ArtifactoryBuildInfoPropertyHelper.java:93)
      3. org.jfrog.bamboo.builder.ArtifactoryMaven3Builder.runBuild(ArtifactoryMaven3Builder.java:452)
      3 frames
    4. com.atlassian.bamboo
      ExecuteBuildTask.call
      1. com.atlassian.bamboo.builder.AbstractBuilder.executeBuild(AbstractBuilder.java:272)
      2. com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:85)
      2 frames
    5. 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:597)
      4 frames
    6. 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
    7. Hibernate
      HibernateInterceptor.invoke
      1. org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
      1 frame
    8. 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
    9. Unknown
      $Proxy218.call
      1. $Proxy218.call(Unknown Source)
      1 frame
    10. com.atlassian.bamboo
      NamedThreadFactory$2.run
      1. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:189)
      2. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:90)
      3. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:102)
      4. com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:50)
      4 frames
    11. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame