Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4032

NPE when no environment variables are set

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      If environment variables are enabled, but none are added, a NPE is thrown when
      saving the config.

      Hudson 1.314

      java.lang.NullPointerException
      at
      hudson.slaves.EnvironmentVariablesNodeProperty.toMap(EnvironmentVariablesNodePro
      perty.java:105)
      at
      hudson.slaves.EnvironmentVariablesNodeProperty.(EnvironmentVariablesNodeProperty
      .java:55)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at
      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorI
      mpl.java:39)
      at
      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorA
      ccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at
      org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:387)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:340)
      at hudson.model.Descriptor.newInstance(Descriptor.java:335)
      at hudson.util.DescribableList.rebuild(DescribableList.java:236)
      at hudson.model.Hudson.doConfigSubmit(Hudson.java:2280)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
      a:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at
      org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:176)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:92)
      at
      org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:53)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:73)
      at
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:486)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:404)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:117)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      at
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:91)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:83)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at
      hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:155)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at
      winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.lang.Thread.run(Thread.java:619)

            Unassigned Unassigned
            mdonohue mdonohue
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: