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

NULLPOINTER exception on build 1.395 when saving configuration

      after upgrading to 1.395 started running into this issue. right before that ..there was a crash with the promoted-build plugin when passing in "-" in the name.
      Status Code: 500

      Exception:
      Stacktrace:
      java.lang.NullPointerException
      at hudson.model.Descriptor.getJsonSafeClassName(Descriptor.java:451)
      at hudson.util.DescribableList.rebuild(DescribableList.java:144)
      at hudson.model.Project.submit(Project.java:197)
      at hudson.model.FreeStyleProject.submit(FreeStyleProject.java:99)
      at hudson.model.Job.doConfigSubmit(Job.java:961)
      at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:620)
      at sun.reflect.GeneratedMethodAccessor949.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:102)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:640)
      at org.kohsuke.stapler.MetaClass$7.doDispatch(MetaClass.java:242)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:640)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:478)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:160)
      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:94)
      at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:52)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:64)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      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:164)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      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:680)

      Generated by Winstone Servlet Engine v0.9.10 at Wed Feb 23 13:27:42 PST 2011

          [JENKINS-8866] NULLPOINTER exception on build 1.395 when saving configuration

          sogabe added a comment -

          Which version of the promoted builds plugin are you using?

          sogabe added a comment - Which version of the promoted builds plugin are you using?

          1.5 of promoted plugin

          vince villanueva added a comment - 1.5 of promoted plugin

          sorry... its 1.11

          vince villanueva added a comment - sorry... its 1.11

          ive since downgraded to multiple version both hudson and the plugins and still the problem exists.

          can anyone help ? the worst thing that has happened is that it actually deleted the configuration.
          other side effect is that it doesnt save any change after the build/shell tasks, like email address changes.

          any help would be appreciated.

          vince villanueva added a comment - ive since downgraded to multiple version both hudson and the plugins and still the problem exists. can anyone help ? the worst thing that has happened is that it actually deleted the configuration. other side effect is that it doesnt save any change after the build/shell tasks, like email address changes. any help would be appreciated.

          We're actually seeing the exact same error after upgrading from Hudson to Jenkins whenever we attempt to configure any of our projects. We're not using the promoted-build plugin, as far as I know. This is really hard for us because we can't configure email notification on failed builds now.

          Derek Chen-Becker added a comment - We're actually seeing the exact same error after upgrading from Hudson to Jenkins whenever we attempt to configure any of our projects. We're not using the promoted-build plugin, as far as I know. This is really hard for us because we can't configure email notification on failed builds now.

          Also, this is Jenkins 1.399 (now, was 1.396 earlier this week) on Ubuntu 8.04.

          Derek Chen-Becker added a comment - Also, this is Jenkins 1.399 (now, was 1.396 earlier this week) on Ubuntu 8.04.

          Last comment for tonight: The stack trace below is for a Freestyle project (we see the same trace with our SBT projects), but we also see a similar trace and the NPE if we try to configure our existing Maven2 projects.

          Derek Chen-Becker added a comment - Last comment for tonight: The stack trace below is for a Freestyle project (we see the same trace with our SBT projects), but we also see a similar trace and the NPE if we try to configure our existing Maven2 projects.

          my hunch is that the main config.xml was modified during the upgrade and is now corrupted. any project that you go to configure..whether or not you make a change will get this error on "submit".

          vince villanueva added a comment - my hunch is that the main config.xml was modified during the upgrade and is now corrupted. any project that you go to configure..whether or not you make a change will get this error on "submit".

          I'd be happy to post the master config.xml as well as those for my projects if that would help diagnose it.

          Derek Chen-Becker added a comment - I'd be happy to post the master config.xml as well as those for my projects if that would help diagnose it.

          BTW, in the logs I get a different underlying exception with the NPE that you show here as the root:

          Mar 4, 2011 4:24:50 AM hudson.ExpressionFactory2$JexlExpression evaluate
          WARNING: Caught exception evaluating: d.jsonSafeClassName. Reason: java.lang.reflect.InvocationTargetException
          java.lang.reflect.InvocationTargetException
          at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
          at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
          at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
          at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
          at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
          at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
          at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
          at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
          at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:72)
          at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:58)
          ... etc ...

          Derek Chen-Becker added a comment - BTW, in the logs I get a different underlying exception with the NPE that you show here as the root: Mar 4, 2011 4:24:50 AM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: d.jsonSafeClassName. Reason: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314) at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185) at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:72) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:58) ... etc ...

          that's just my hunch on the config.xml, but i did take a look at it and it seems kosher... we really need some help from the dev folks to provide us a little more guidance.

          btw, how did you get to the log files? i'd like to check to see if i save the same underlying trace.

          vince villanueva added a comment - that's just my hunch on the config.xml, but i did take a look at it and it seems kosher... we really need some help from the dev folks to provide us a little more guidance. btw, how did you get to the log files? i'd like to check to see if i save the same underlying trace.

          We use the "--logfile=" parameter when we start hudson, so our log file is right in the home dir. I'm not sure where the default location is for the log file but I suspect it's under ~/.hudson

          Derek Chen-Becker added a comment - We use the "--logfile=" parameter when we start hudson, so our log file is right in the home dir. I'm not sure where the default location is for the log file but I suspect it's under ~/.hudson

          Derek, find any resolution around this yet?

          vince villanueva added a comment - Derek, find any resolution around this yet?

          I haven't had time to look into it. I tried searching for some kind of reference to config.xml to see if I could find the issue, but no luck.

          Derek Chen-Becker added a comment - I haven't had time to look into it. I tried searching for some kind of reference to config.xml to see if I could find the issue, but no luck.

          there was another person (jason z) that had the same problem...i tried to email him with no luck... i hope he's watching this post and maybe he has a solution

          vince villanueva added a comment - there was another person (jason z) that had the same problem...i tried to email him with no luck... i hope he's watching this post and maybe he has a solution

          Jason is one of the users of our server. He was trying to help me out

          Derek Chen-Becker added a comment - Jason is one of the users of our server. He was trying to help me out

          This problem is most likely caused by some plugins that incorrectly return null from the getId() method. The error message doesn't tell us which, though, so in Jenkins 1.402 I added the code to look for these problematic implementations more proactively and issue a warning in the "Manage Jenkins" screen.

          Kohsuke Kawaguchi added a comment - This problem is most likely caused by some plugins that incorrectly return null from the getId() method. The error message doesn't tell us which, though, so in Jenkins 1.402 I added the code to look for these problematic implementations more proactively and issue a warning in the "Manage Jenkins" screen.

          Thanks Kohsuke! We'll give it a go and post back here results

          vince villanueva added a comment - Thanks Kohsuke! We'll give it a go and post back here results

          Thanks! I'll schedule an upgrade ASAP and I'll get back to you with any findings.

          Derek Chen-Becker added a comment - Thanks! I'll schedule an upgrade ASAP and I'll get back to you with any findings.

          I just noticed that the latest release is 1.400 on the website. Any idea on an ETA for 1.402?

          Derek Chen-Becker added a comment - I just noticed that the latest release is 1.400 on the website. Any idea on an ETA for 1.402?

          dogfood added a comment -

          Integrated in jenkins_main_trunk #562
          [FIXED JENKINS-8866] Look for Descriptor.getId()==null and warn the administrator

          Kohsuke Kawaguchi : 229f536cbafadde6d1be07b92b367d2a7eba8609
          Files :

          • core/src/main/java/hudson/model/Descriptor.java
          • core/src/main/resources/hudson/diagnosis/NullIdDescriptorMonitor/message.properties
          • changelog.html
          • core/src/main/resources/hudson/diagnosis/NullIdDescriptorMonitor/message.jelly
          • core/src/main/java/hudson/PluginManager.java
          • core/src/main/java/hudson/model/Hudson.java
          • core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java

          dogfood added a comment - Integrated in jenkins_main_trunk #562 [FIXED JENKINS-8866] Look for Descriptor.getId()==null and warn the administrator Kohsuke Kawaguchi : 229f536cbafadde6d1be07b92b367d2a7eba8609 Files : core/src/main/java/hudson/model/Descriptor.java core/src/main/resources/hudson/diagnosis/NullIdDescriptorMonitor/message.properties changelog.html core/src/main/resources/hudson/diagnosis/NullIdDescriptorMonitor/message.jelly core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/model/Hudson.java core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java

          Right, but the POM on GitHub indicates that it's currently 1.402-SNAPSHOT

          Derek Chen-Becker added a comment - Right, but the POM on GitHub indicates that it's currently 1.402-SNAPSHOT

          EUREKA!!!! it was the twitter plugin causing the problem....i removed it and now it's fine!
          Thanks Kosuhke!

          vince villanueva added a comment - EUREKA!!!! it was the twitter plugin causing the problem....i removed it and now it's fine! Thanks Kosuhke!

          Fixed toward 1.402.

          Kohsuke Kawaguchi added a comment - Fixed toward 1.402.

          Same here. Disabling the twitter plugin fixed it! Thanks!

          Derek Chen-Becker added a comment - Same here. Disabling the twitter plugin fixed it! Thanks!

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/PluginManager.java
          core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java
          core/src/main/java/hudson/model/Descriptor.java
          core/src/main/java/hudson/model/Hudson.java
          core/src/main/resources/hudson/diagnosis/NullIdDescriptorMonitor/message.jelly
          core/src/main/resources/hudson/diagnosis/NullIdDescriptorMonitor/message.properties
          http://jenkins-ci.org/commit/jenkins/6694994db5aa0e50d6413fe38338c27e4123df89
          Log:
          [FIXED JENKINS-8866] Look for Descriptor.getId()==null and warn the administrator

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/PluginManager.java core/src/main/java/hudson/diagnosis/NullIdDescriptorMonitor.java core/src/main/java/hudson/model/Descriptor.java core/src/main/java/hudson/model/Hudson.java core/src/main/resources/hudson/diagnosis/NullIdDescriptorMonitor/message.jelly core/src/main/resources/hudson/diagnosis/NullIdDescriptorMonitor/message.properties http://jenkins-ci.org/commit/jenkins/6694994db5aa0e50d6413fe38338c27e4123df89 Log: [FIXED JENKINS-8866] Look for Descriptor.getId()==null and warn the administrator

            Unassigned Unassigned
            firstaudio vince villanueva
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: