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

NPE when configure unstable level to 0

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: violations-plugin
    • Labels:
      None
    • Environment:
      Jenkins: 1.398
      Violation plugins: 0.7.7
    • Similar Issues:
      Show 5 results

      Description

      When setting 0 in unstable level, NPE occur on save.

      java.lang.NullPointerException
      hudson.plugins.violations.TypeConfig.setUnstable(TypeConfig.java:109)
      sun.reflect.GeneratedMethodAccessor397.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      Unstable level fields on the configuration page are empty and not "0" after that.

        Attachments

          Activity

          Hide
          evernat evernat added a comment -

          I do not reproduce this issue with violations plugin 0.7.10 and jenkins 1.451.
          Do you confirm that it has been fixed (with recent versions of the plugin and of Jenkins)?

          Show
          evernat evernat added a comment - I do not reproduce this issue with violations plugin 0.7.10 and jenkins 1.451. Do you confirm that it has been fixed (with recent versions of the plugin and of Jenkins)?
          Hide
          aeris Nicolas VINOT added a comment -

          Yep, I retest it and it seems OK with Jenkins 1.451 and Violation plugin 0.7.10 too

          Show
          aeris Nicolas VINOT added a comment - Yep, I retest it and it seems OK with Jenkins 1.451 and Violation plugin 0.7.10 too
          Hide
          evernat evernat added a comment -

          Thanks

          Show
          evernat evernat added a comment - Thanks
          Hide
          aeris Nicolas VINOT added a comment -

          Hum, not completely fixed.
          Setting violation level to 0 don't lead to NPE when submit, but then related violation fields on config page are empty, leading to another NPE if you re-submit this page after no violation related changes.

          Show
          aeris Nicolas VINOT added a comment - Hum, not completely fixed. Setting violation level to 0 don't lead to NPE when submit, but then related violation fields on config page are empty, leading to another NPE if you re-submit this page after no violation related changes.
          Hide
          hiteswar_kumar hiteswar kumar added a comment -

          any fix or workaround for this ?

          i also found below stack trace while saving page 2 time after entring 0 value .

          jenkins core- LTS 1.554.2
          violation plugin- 0.7.11

          Stack trace

          javax.servlet.ServletException: java.lang.NullPointerException
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:778)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
          at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
          at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
          at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
          at com.cisco.step.jenkins.plugins.people.redirector.PeopleRedirectorPlugin$1.doFilter(PeopleRedirectorPlugin.java:91)
          at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
          at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
          at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
          at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
          at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:79)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
          at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
          at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
          at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
          at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
          at java.lang.Thread.run(Thread.java:744)
          Caused by: java.lang.NullPointerException
          at hudson.plugins.violations.TypeConfig.setUnstable(TypeConfig.java:109)
          at sun.reflect.GeneratedMethodAccessor345.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2170)
          at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2151)
          at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:890)
          at org.kohsuke.stapler.RequestImpl.copyProperty(RequestImpl.java:813)
          at org.kohsuke.stapler.RequestImpl.fill(RequestImpl.java:496)
          at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:313)
          at hudson.plugins.violations.hudson.ViolationsFreestyleDescriptor.newInstance(ViolationsFreestyleDescriptor.java:66)
          at hudson.plugins.violations.hudson.ViolationsFreestyleDescriptor.newInstance(ViolationsFreestyleDescriptor.java:22)
          at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:914)
          at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:899)
          at hudson.util.DescribableList.rebuildHetero(DescribableList.java:203)
          at hudson.model.Project.submit(Project.java:208)
          at hudson.model.Job.doConfigSubmit(Job.java:1136)
          at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:786)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
          at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
          at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
          at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
          ... 60 more

          Show
          hiteswar_kumar hiteswar kumar added a comment - any fix or workaround for this ? i also found below stack trace while saving page 2 time after entring 0 value . jenkins core- LTS 1.554.2 violation plugin- 0.7.11 Stack trace javax.servlet.ServletException: java.lang.NullPointerException at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:778) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631) at org.kohsuke.stapler.Stapler.service(Stapler.java:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96) at com.cisco.step.jenkins.plugins.people.redirector.PeopleRedirectorPlugin$1.doFilter(PeopleRedirectorPlugin.java:91) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99) at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:79) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.NullPointerException at hudson.plugins.violations.TypeConfig.setUnstable(TypeConfig.java:109) at sun.reflect.GeneratedMethodAccessor345.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:2170) at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:2151) at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:890) at org.kohsuke.stapler.RequestImpl.copyProperty(RequestImpl.java:813) at org.kohsuke.stapler.RequestImpl.fill(RequestImpl.java:496) at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:313) at hudson.plugins.violations.hudson.ViolationsFreestyleDescriptor.newInstance(ViolationsFreestyleDescriptor.java:66) at hudson.plugins.violations.hudson.ViolationsFreestyleDescriptor.newInstance(ViolationsFreestyleDescriptor.java:22) at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:914) at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:899) at hudson.util.DescribableList.rebuildHetero(DescribableList.java:203) at hudson.model.Project.submit(Project.java:208) at hudson.model.Job.doConfigSubmit(Job.java:1136) at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:786) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) ... 60 more

            People

            • Assignee:
              peterkittreilly peterkittreilly
              Reporter:
              aeris Nicolas VINOT
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: