java.lang.NullPointerException

Jenkins JIRA | Krzysztof Malinowski | 4 years ago
  1. 0

    When we upgraded our Jenkins to 1.485, some of our jobs did not show up on start-up even though their configuration files were still present. When we rolled Jenkins back to 1.484, the jobs reappeared. This problem continued with 1.486 One common theme between the jobs that didn't show up is they use the parameterized-trigger plugin, which we are using 2.14. We have not upgraded this plugin because it removes the ability to specify triggering with multiple properties files In the Jenkins error logs, I see this NPE: {noformat} Oct 15, 2012 3:34:56 PM jenkins.InitReactorRunner$1 onAttained INFO: Augmented all extensions java.lang.NullPointerException at hudson.model.Run.getRootDir(Run.java:900) at org.jenkinsci.lib.envinject.EnvInjectAction.readResolve(EnvInjectAction.java:86) at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:46) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71) at hudson.util.RobustCollectionConverter.populateCollection(RobustCollectionConverter.java:85) at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61) at hudson.util.RobustCollectionConverter.unmarshal(RobustCollectionConverter.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:332) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:274) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:221) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:926) at hudson.util.XStream2.unmarshal(XStream2.java:103) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:912) at hudson.XmlFile.unmarshal(XmlFile.java:160) at hudson.model.Run.reload(Run.java:291) at hudson.model.Run.<init>(Run.java:280) at hudson.model.AbstractBuild.<init>(AbstractBuild.java:182) at hudson.model.Build.<init>(Build.java:103) at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:41) at sun.reflect.GeneratedConstructorAccessor49.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at hudson.model.AbstractProject.loadBuild(AbstractProject.java:1061) at hudson.model.AbstractProject$1.create(AbstractProject.java:275) at hudson.model.AbstractProject$1.create(AbstractProject.java:273) at hudson.model.RunMap.retrieve(RunMap.java:220) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:613) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:596) at jenkins.model.lazy.AbstractLazyLoadRunMap.all(AbstractLazyLoadRunMap.java:549) at jenkins.model.lazy.AbstractLazyLoadRunMap.entrySet(AbstractLazyLoadRunMap.java:234) at java.util.AbstractMap$2$1.<init>(Unknown Source) at java.util.AbstractMap$2.iterator(Unknown Source) at hudson.util.RunList.iterator(RunList.java:103) at org.jvnet.hudson.plugins.DownStreamProjectActionFactory.createFor(DownStreamProjectActionFactory.java:59) at hudson.model.AbstractProject.createTransientActions(AbstractProject.java:675) at hudson.model.Project.createTransientActions(Project.java:208) at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:665) at hudson.model.AbstractProject.onLoad(AbstractProject.java:299) at hudson.model.Project.onLoad(Project.java:88) at hudson.model.Items.load(Items.java:221) at jenkins.model.Jenkins$17.run(Jenkins.java:2507) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:883) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {noformat}

    Jenkins JIRA | 4 years ago | Brian Freed
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    When we upgraded our Jenkins to 1.485, some of our jobs did not show up on start-up even though their configuration files were still present. When we rolled Jenkins back to 1.484, the jobs reappeared. This problem continued with 1.486 One common theme between the jobs that didn't show up is they use the parameterized-trigger plugin, which we are using 2.14. We have not upgraded this plugin because it removes the ability to specify triggering with multiple properties files In the Jenkins error logs, I see this NPE: {noformat} Oct 15, 2012 3:34:56 PM jenkins.InitReactorRunner$1 onAttained INFO: Augmented all extensions java.lang.NullPointerException at hudson.model.Run.getRootDir(Run.java:900) at org.jenkinsci.lib.envinject.EnvInjectAction.readResolve(EnvInjectAction.java:86) at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:46) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71) at hudson.util.RobustCollectionConverter.populateCollection(RobustCollectionConverter.java:85) at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:61) at hudson.util.RobustCollectionConverter.unmarshal(RobustCollectionConverter.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:332) at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:274) at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:221) at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82) at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76) at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60) at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:926) at hudson.util.XStream2.unmarshal(XStream2.java:103) at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:912) at hudson.XmlFile.unmarshal(XmlFile.java:160) at hudson.model.Run.reload(Run.java:291) at hudson.model.Run.<init>(Run.java:280) at hudson.model.AbstractBuild.<init>(AbstractBuild.java:182) at hudson.model.Build.<init>(Build.java:103) at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:41) at sun.reflect.GeneratedConstructorAccessor49.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at hudson.model.AbstractProject.loadBuild(AbstractProject.java:1061) at hudson.model.AbstractProject$1.create(AbstractProject.java:275) at hudson.model.AbstractProject$1.create(AbstractProject.java:273) at hudson.model.RunMap.retrieve(RunMap.java:220) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:613) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:596) at jenkins.model.lazy.AbstractLazyLoadRunMap.all(AbstractLazyLoadRunMap.java:549) at jenkins.model.lazy.AbstractLazyLoadRunMap.entrySet(AbstractLazyLoadRunMap.java:234) at java.util.AbstractMap$2$1.<init>(Unknown Source) at java.util.AbstractMap$2.iterator(Unknown Source) at hudson.util.RunList.iterator(RunList.java:103) at org.jvnet.hudson.plugins.DownStreamProjectActionFactory.createFor(DownStreamProjectActionFactory.java:59) at hudson.model.AbstractProject.createTransientActions(AbstractProject.java:675) at hudson.model.Project.createTransientActions(Project.java:208) at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:665) at hudson.model.AbstractProject.onLoad(AbstractProject.java:299) at hudson.model.Project.onLoad(Project.java:88) at hudson.model.Items.load(Items.java:221) at jenkins.model.Jenkins$17.run(Jenkins.java:2507) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:883) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {noformat}

    Jenkins JIRA | 4 years ago | Brian Freed
    java.lang.NullPointerException
  4. 0

    I'm getting error 500 with NullPointerException. The problem occurs when the build finishes and the plugin tries to parse the result, when I click on the performance report link, this is what happens: Status Code: 500 Exception: Stacktrace: java.lang.NullPointerException at hudson.model.Run.getRootDir(Run.java:943) at hudson.plugins.performance.PerformanceReportMap.parseReports(PerformanceReportMap.java:212) at hudson.plugins.performance.PerformanceReportMap.<init>(PerformanceReportMap.java:56) at hudson.plugins.performance.PerformanceBuildAction.getPerformanceReportMap(PerformanceBuildAction.java:79) at hudson.plugins.performance.PerformanceBuildAction.getTarget(PerformanceBuildAction.java:58) at hudson.plugins.performance.PerformanceBuildAction.getTarget(PerformanceBuildAction.java:15) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:604) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583) at org.kohsuke.stapler.Stapler.service(Stapler.java:214) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:248) at winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at winstone.RequestDispatcher.forward(RequestDispatcher.java:331) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Generated by Winstone Servlet Engine v0.9.10 at Fri Apr 05 09:14:34 EDT 2013

    Jenkins JIRA | 4 years ago | Igor Escobar
    java.lang.NullPointerException

    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 hudson.model.Run.getRootDir()
    2. Hudson
      Run.getRootDir
      1. hudson.model.Run.getRootDir(Run.java:927)
      1 frame
    3. org.jenkinsci.lib
      EnvInjectAction.readResolve
      1. org.jenkinsci.lib.envinject.EnvInjectAction.readResolve(EnvInjectAction.java:86)
      1 frame