java.lang.NullPointerException

Jenkins JIRA | Jeff Blaine | 1 year 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

    Jenkins 1.658 and SSH Credentials 1.10 and 1.11 The command: {{/usr/lib/jvm/java-1.8.0/bin/java -jar /var/chef/cache/jenkins-cli.jar -s http://jenkins.our.org:8080 -i /var/chef/cache/jenkins-key groovy /tmp/groovy20160506-13473-xnbfhf}} Where {{/tmp/groovy20160506-13473-xnbfhf}} consists of: {code} import com.cloudbees.plugins.credentials.impl.*; import com.cloudbees.jenkins.plugins.sshcredentials.impl.*; import jenkins.model.* import com.cloudbees.plugins.credentials.* import com.cloudbees.plugins.credentials.common.* import com.cloudbees.plugins.credentials.domains.*; username_matcher = CredentialsMatchers.withUsername("jenkins") available_credentials = CredentialsProvider.lookupCredentials( StandardUsernameCredentials.class, Jenkins.getInstance(), hudson.security.ACL.SYSTEM, new SchemeRequirement("ssh") ) credentials = CredentialsMatchers.firstOrNull( available_credentials, username_matcher ) if (credentials == null) { return null } current_credentials = [ id:credentials.id, description:credentials.description, username:credentials.username ] current_credentials['private_key'] = credentials.privateKey current_credentials['passphrase'] = credentials.passphrase.plainText builder = new groovy.json.JsonBuilder(current_credentials) println(builder) {code} Results in: {code} java.lang.NullPointerException at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:127) at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKey(BasicSSHUserPrivateKey.java:121) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3500) at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) at RemoteClass.run(RemoteClass:35) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266) at groovy.lang.GroovyShell.run(GroovyShell.java:517) at hudson.cli.GroovyCommand.run(GroovyCommand.java:86) at hudson.cli.CLICommand.main(CLICommand.java:256) at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:583) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:542) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63) at hudson.remoting.CallableDecoratorAdapter.call(CallableDecoratorAdapter.java:18) at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code}

    Jenkins JIRA | 1 year ago | Jeff Blaine
    java.lang.NullPointerException
  2. 0

    Jenkins 1.658 and SSH Credentials 1.10 and 1.11 The command: {{/usr/lib/jvm/java-1.8.0/bin/java -jar /var/chef/cache/jenkins-cli.jar -s http://jenkins.our.org:8080 -i /var/chef/cache/jenkins-key groovy /tmp/groovy20160506-13473-xnbfhf}} Where {{/tmp/groovy20160506-13473-xnbfhf}} consists of: {code} import com.cloudbees.plugins.credentials.impl.*; import com.cloudbees.jenkins.plugins.sshcredentials.impl.*; import jenkins.model.* import com.cloudbees.plugins.credentials.* import com.cloudbees.plugins.credentials.common.* import com.cloudbees.plugins.credentials.domains.*; username_matcher = CredentialsMatchers.withUsername("jenkins") available_credentials = CredentialsProvider.lookupCredentials( StandardUsernameCredentials.class, Jenkins.getInstance(), hudson.security.ACL.SYSTEM, new SchemeRequirement("ssh") ) credentials = CredentialsMatchers.firstOrNull( available_credentials, username_matcher ) if (credentials == null) { return null } current_credentials = [ id:credentials.id, description:credentials.description, username:credentials.username ] current_credentials['private_key'] = credentials.privateKey current_credentials['passphrase'] = credentials.passphrase.plainText builder = new groovy.json.JsonBuilder(current_credentials) println(builder) {code} Results in: {code} java.lang.NullPointerException at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:127) at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKey(BasicSSHUserPrivateKey.java:121) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3500) at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227) at RemoteClass.run(RemoteClass:35) at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266) at groovy.lang.GroovyShell.run(GroovyShell.java:517) at hudson.cli.GroovyCommand.run(GroovyCommand.java:86) at hudson.cli.CLICommand.main(CLICommand.java:256) at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:583) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:542) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63) at hudson.remoting.CallableDecoratorAdapter.call(CallableDecoratorAdapter.java:18) at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code}

    Jenkins JIRA | 1 year ago | Jeff Blaine
    java.lang.NullPointerException
  3. 0

    [JIRA] [ssh-credentials-plugin] (JENKINS-34653) nullpointerexception

    Google Groups | 1 year ago | jbl...@kickflop.net (JIRA)
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Getting a nullpointer exception when switching displayables in J2ME

    Stack Overflow | 7 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
  6. 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

    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.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys()
    2. com.cloudbees.jenkins
      BasicSSHUserPrivateKey.getPrivateKey
      1. com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:127)
      2. com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKey(BasicSSHUserPrivateKey.java:121)
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    4. Groovy
      AbstractCallSite.callGetProperty
      1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
      3. groovy.lang.MetaClassImpl$GetBeanMethodMetaProperty.getProperty(MetaClassImpl.java:3500)
      4. org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:61)
      5. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
      5 frames
    5. Unknown
      RemoteClass.run
      1. RemoteClass.run(RemoteClass:35)
      1 frame
    6. Groovy
      GroovyShell.run
      1. groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:266)
      2. groovy.lang.GroovyShell.run(GroovyShell.java:517)
      2 frames
    7. Hudson
      CliManagerImpl.main
      1. hudson.cli.GroovyCommand.run(GroovyCommand.java:86)
      2. hudson.cli.CLICommand.main(CLICommand.java:256)
      3. hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
      3 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    9. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:608)
      2. hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:583)
      3. hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:542)
      4. hudson.remoting.UserRequest.perform(UserRequest.java:120)
      5. hudson.remoting.UserRequest.perform(UserRequest.java:48)
      6. hudson.remoting.Request$2.run(Request.java:332)
      7. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      7 frames
    10. Hudson
      CliManagerImpl$1.call
      1. hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
      1 frame
    11. Hudson :: Remoting Layer
      CallableDecoratorList$1.call
      1. hudson.remoting.CallableDecoratorAdapter.call(CallableDecoratorAdapter.java:18)
      2. hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
      2 frames
    12. jenkins.util
      ContextResettingExecutorService$2.call
      1. jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      1 frame
    13. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames