java.lang.NullPointerException

Jenkins JIRA | Vard Lott | 3 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

    While executing shell post-step, I am attempting to do a "sudo service tomcat stop", the jenkins server crashes completely and the build fails with exception below: [workspace] $ /bin/sh -xe /tmp/hudson1433417204994586409.sh + sudo service tomcat stop Stopping Tomcat JVM: Build was aborted FATAL: null java.lang.NullPointerException at hudson.model.User.get(User.java:322) at hudson.model.User.get(User.java:300) at hudson.model.User.get(User.java:365) at jenkins.model.CauseOfInterruption$UserInterruption.getUser(CauseOfInterruption.java:82) at jenkins.model.CauseOfInterruption$UserInterruption.print(CauseOfInterruption.java:91) at hudson.model.Executor.recordCauseOfInterruption(Executor.java:189) at hudson.model.Run.execute(Run.java:1695) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) On my ci box tomcat is running as a service as the tomcat user. Running "sudo service tomcat start/stop" works fine from the command prompt. I need to issue the same commands from within jenkins build. This is a new install of v1.544, I'm running on 64-bit Amazon Linux (Centos/RedHat) with plenty of memory and storage. Jenkins is configured as a service and started stopped in the same way "sudo service jenkins start". There are no other stack traces or errors that I can identify in the jenkins log in /etc/sysconfig or in /var/log/messages.

    Jenkins JIRA | 3 years ago | Vard Lott
    java.lang.NullPointerException
  2. 0

    While executing shell post-step, I am attempting to do a "sudo service tomcat stop", the jenkins server crashes completely and the build fails with exception below: [workspace] $ /bin/sh -xe /tmp/hudson1433417204994586409.sh + sudo service tomcat stop Stopping Tomcat JVM: Build was aborted FATAL: null java.lang.NullPointerException at hudson.model.User.get(User.java:322) at hudson.model.User.get(User.java:300) at hudson.model.User.get(User.java:365) at jenkins.model.CauseOfInterruption$UserInterruption.getUser(CauseOfInterruption.java:82) at jenkins.model.CauseOfInterruption$UserInterruption.print(CauseOfInterruption.java:91) at hudson.model.Executor.recordCauseOfInterruption(Executor.java:189) at hudson.model.Run.execute(Run.java:1695) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) On my ci box tomcat is running as a service as the tomcat user. Running "sudo service tomcat start/stop" works fine from the command prompt. I need to issue the same commands from within jenkins build. This is a new install of v1.544, I'm running on 64-bit Amazon Linux (Centos/RedHat) with plenty of memory and storage. Jenkins is configured as a service and started stopped in the same way "sudo service jenkins start". There are no other stack traces or errors that I can identify in the jenkins log in /etc/sysconfig or in /var/log/messages.

    Jenkins JIRA | 3 years ago | Vard Lott
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.model.User.get()
    2. Hudson
      User.get
      1. hudson.model.User.get(User.java:322)
      2. hudson.model.User.get(User.java:300)
      3. hudson.model.User.get(User.java:365)
      3 frames
    3. jenkins.model
      CauseOfInterruption$UserInterruption.print
      1. jenkins.model.CauseOfInterruption$UserInterruption.getUser(CauseOfInterruption.java:82)
      2. jenkins.model.CauseOfInterruption$UserInterruption.print(CauseOfInterruption.java:91)
      2 frames
    4. Hudson
      Run.execute
      1. hudson.model.Executor.recordCauseOfInterruption(Executor.java:189)
      2. hudson.model.Run.execute(Run.java:1695)
      2 frames
    5. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
      1 frame
    6. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:88)
      2. hudson.model.Executor.run(Executor.java:231)
      2 frames