java.lang.NullPointerException

Jenkins JIRA | Pavel Janoušek | 6 months 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

    My testing environment went to the state when it is unable to provision any Foreman node. In the server.log, I've found this exception:{code}2016-09-14 04:59:50,035 SEVERE [hudson.triggers.SafeTimerTask] (jenkins.util.Timer [#8]) Timer task hudson.slaves.NodeProvisioner$NodeProvisionerInvoker@77be2155 failed java.lang.NullPointerException at com.redhat.foreman.ForemanSharedNodeCloud.canProvision(ForemanSharedNodeCloud.java:155) at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:661) at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:286) at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:57) at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:775) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:682) {code}. The sourcecode of canProvision:{code} @Override public boolean canProvision(Label label) { Map<String, String> hostsMap = getForemanAPI().getCompatibleHosts(); Set<String> hosts = hostsMap.keySet(); for (String host: hosts) { boolean match = label.matches(Label.parse(hostsMap.get(host))); if (match) { return true; } } return false; } {code} line 155:{code}boolean match = label.matches(Label.parse(hostsMap.get(host)));{code} * in the Foreman there are defined three compatible nodes currently, each with some label assigned. * click on Test connection works

    Jenkins JIRA | 6 months ago | Pavel Janoušek
    java.lang.NullPointerException
  2. 0

    [JIRA] (JENKINS-38196) NPE during node provision

    Google Groups | 6 months ago | pjan...@redhat.com (JIRA)
    java.lang.NullPointerException
  3. 0

    Getting a nullpointer exception when switching displayables in J2ME

    Stack Overflow | 6 years ago | Pallinder
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    J2ME (Java) - Null Pointer Exception caught in Display Class

    Stack Overflow | 6 years ago | Tom
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  6. 0

    Cloud Foundry v2 in Grails

    Stack Overflow | 2 years ago | angelo087
    java.lang.NullPointerException: Cannot invoke method getAt() on null object

    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.redhat.foreman.ForemanSharedNodeCloud.canProvision()
    2. com.redhat.foreman
      ForemanSharedNodeCloud.canProvision
      1. com.redhat.foreman.ForemanSharedNodeCloud.canProvision(ForemanSharedNodeCloud.java:155)
      1 frame
    3. Hudson
      SafeTimerTask.run
      1. hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:661)
      2. hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:286)
      3. hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:57)
      4. hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:775)
      5. hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
      5 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      2. java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
      3. java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
      5. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
      6. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
      7. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      8. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      9. java.lang.Thread.run(Thread.java:682)
      9 frames