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

NPE when no environment variables are set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      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)

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/src/main/java/hudson/slaves/EnvironmentVariablesNodeProperty.java
          trunk/www/changelog.html
          http://fisheye4.cenqua.com/changelog/hudson/?cs=19718
          Log:
          [FIXED JENKINS-4032] Fixed in 1.316.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/src/main/java/hudson/slaves/EnvironmentVariablesNodeProperty.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=19718 Log: [FIXED JENKINS-4032] Fixed in 1.316.

            People

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

              Dates

              Created:
              Updated:
              Resolved: