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

NPE while saving a project config (Fisheye and perhaps proxy related)

    XMLWordPrintable

    Details

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

      Description

      (Note there's no scm subcomponent, so I place this under other)

      I upgraded from 215 to 226 to test the plugin center. I updated a project and
      while saving I get:

      java.lang.NullPointerException
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:305)
      at hudson.model.Descriptor.newInstance(Descriptor.java:136)
      at hudson.scm.RepositoryBrowsers.createInstance(RepositoryBrowsers.java:51)
      at hudson.scm.SubversionSCM$DescriptorImpl.newInstance(SubversionSCM.java:1020)
      at hudson.scm.SubversionSCM$DescriptorImpl.newInstance(SubversionSCM.java:799)
      at hudson.model.Descriptor.newInstance(Descriptor.java:133)
      at hudson.scm.SCMS.parseSCM(SCMS.java:37)
      at hudson.model.AbstractProject.submit(AbstractProject.java:902)
      at hudson.model.Project.submit(Project.java:144)
      at hudson.model.FreeStyleProject.submit(FreeStyleProject.java:68)
      at hudson.model.Job.doConfigSubmit(Job.java:826)
      at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:301)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:103)
      at org.kohsuke.stapler.Function.bindAndinvoke(Function.java:57)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:440)
      at org.kohsuke.stapler.MetaClass$9.doDispatch(MetaClass.java:254)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:440)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:361)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:121)
      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:38)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:30)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:88)
      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:595)

      The failing code is

      public T newInstance(StaplerRequest req, JSONObject formData) throws
      FormException {
      try {
      Method m = getClass().getMethod("newInstance", StaplerRequest.class);

      if(!Modifier.isAbstract(m.getDeclaringClass().getModifiers()))

      { // this class overrides newInstance(StaplerRequest). // maintain the backward compatible behavior return newInstance(req); }

      else

      { // new behavior as of 1.206 ---> return req.bindJSON(clazz,formData); }

      } catch (NoSuchMethodException e)

      { throw new AssertionError(e); // impossible }

      }

      Removing the fisheye entry solves it.

      Other things I've changed to support 226: changed my start up script to include
      proxy support
      -Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=".edb.com|10."

      This to solve a time out issue I am having at startup. This makes hudson start
      in under one minute instead of 500 seconds. Not sure yet if it is related.

        Attachments

          Issue Links

            Activity

            Hide
            kohsuke Kohsuke Kawaguchi added a comment -
                • Issue 1890 has been marked as a duplicate of this issue. ***
            Show
            kohsuke Kohsuke Kawaguchi added a comment - Issue 1890 has been marked as a duplicate of this issue. ***
            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/scm/CVSSCM.java
            trunk/hudson/main/core/src/main/java/hudson/scm/RepositoryBrowsers.java
            trunk/hudson/main/core/src/main/java/hudson/scm/SubversionSCM.java
            trunk/hudson/main/core/src/main/resources/lib/form/dropdownList.jelly
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=10236
            Log:
            [FIXED JENKINS-1891] Fixed NPE in configuring repository browsers.

            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/scm/CVSSCM.java trunk/hudson/main/core/src/main/java/hudson/scm/RepositoryBrowsers.java trunk/hudson/main/core/src/main/java/hudson/scm/SubversionSCM.java trunk/hudson/main/core/src/main/resources/lib/form/dropdownList.jelly trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=10236 Log: [FIXED JENKINS-1891] Fixed NPE in configuring repository browsers.
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -
                • Issue 1857 has been marked as a duplicate of this issue. ***
            Show
            kohsuke Kohsuke Kawaguchi added a comment - Issue 1857 has been marked as a duplicate of this issue. ***
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -
                • Issue 1865 has been marked as a duplicate of this issue. ***
            Show
            kohsuke Kohsuke Kawaguchi added a comment - Issue 1865 has been marked as a duplicate of this issue. ***

              People

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

                Dates

                Created:
                Updated:
                Resolved: