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

Cannot create a new View

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • core
    • None

    Description

      I'm using version 1.336

      • In the main desktop I clicked on the last tab with the "+" sign.
      • Typed in "OE-SupplyChain" for the View Name.
      • Clicked "List View" radio button.
      • Clicked OK button

      Got the following exception:
      type Exception report
      message
      description The server encountered an internal error () that prevented it from fulfilling this request.
      exception
      javax.servlet.ServletException: java.lang.NullPointerException
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:527)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:408)
      org.kohsuke.stapler.Stapler.service(Stapler.java:117)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:304)
      org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:31)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:64)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      root cause
      java.lang.NullPointerException
      hudson.model.Descriptor.newInstance(Descriptor.java:351)
      hudson.model.ListView.initColumns(ListView.java:138)
      hudson.model.ListView.<init>(ListView.java:98)
      sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      java.lang.reflect.Constructor.newInstance(Constructor.java:521)
      org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:391)
      org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:344)
      hudson.model.Descriptor.newInstance(Descriptor.java:351)
      hudson.model.View.create(View.java:604)
      hudson.model.Hudson.doCreateView(Hudson.java:2589)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      java.lang.reflect.Method.invoke(Method.java:615)
      org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
      org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
      org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
      org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:408)
      org.kohsuke.stapler.Stapler.service(Stapler.java:117)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:304)
      org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:31)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:64)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.

      Attachments

        Issue Links

          Activity

            I was about to submit the same issue with Hudson ver. 1.337:

            Status Code: 500
            Exception:
            Stacktrace:

            java.lang.NullPointerException
            at hudson.model.Descriptor.newInstance(Descriptor.java:351)
            at hudson.model.ListView.initColumns(ListView.java:138)
            at hudson.model.ListView.(ListView.java:98)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
            at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:391)
            at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:344)
            at hudson.model.Descriptor.newInstance(Descriptor.java:351)
            at hudson.model.View.create(View.java:683)
            at hudson.model.Hudson.doCreateView(Hudson.java:2599)
            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:597)
            at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185)
            at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101)
            at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54)
            at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74)
            at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492)
            at org.kohsuke.stapler.Stapler.invoke(Stapler.java:408)
            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:94)
            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 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)

            Generated by Winstone Servlet Engine v0.9.10 at Mon Dec 14 15:50:20 CET 2009

            Régis

            rdesgroppes Régis Desgroppes added a comment - I was about to submit the same issue with Hudson ver. 1.337: Status Code: 500 Exception: Stacktrace: java.lang.NullPointerException at hudson.model.Descriptor.newInstance(Descriptor.java:351) at hudson.model.ListView.initColumns(ListView.java:138) at hudson.model.ListView.(ListView.java:98) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:391) at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:344) at hudson.model.Descriptor.newInstance(Descriptor.java:351) at hudson.model.View.create(View.java:683) at hudson.model.Hudson.doCreateView(Hudson.java:2599) 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:597) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:185) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:101) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:54) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:74) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:492) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:408) 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:94) 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 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) Generated by Winstone Servlet Engine v0.9.10 at Mon Dec 14 15:50:20 CET 2009 Régis
            cbos Cees Bos added a comment -

            We have the same issue.
            This is blocking in creating new views and changing views.

            cbos Cees Bos added a comment - We have the same issue. This is blocking in creating new views and changing views.
            tbingaman Timothy Bingaman added a comment - - edited

            This is affecting the Sectioned View Plugin as well (when it contains one or more List View Sections).

            I believe this is occurring because of the way List Views initialize the default columns. There is no StaplerRequest object available at the time of instantiation so they are calling d.newInstance(null,null) on the column Descriptor objects. The javadoc for this method states that StaplerRequest must always be non-null (yet the code is passing in null).

            The default columns bundled in Hudson get around this by overriding this method:

                    @Override
                    public ListViewColumn newInstance(StaplerRequest req, JSONObject formData) throws FormException {
                        // This will be called with req == null also the Descriptor's doc tells you not. so the default impl fails
                        return new LastDurationColumn();
                    }
            

            My assumption is that one of the additional columns provided by a plugin does not do this and that everyone seeing this issue has a plugin installed that provides an additional list view column. This is just speculation though as I haven't been able to duplicate the issue locally yet.

            It would help a lot if people seeing the issue could provide a list of plugins they have installed.

            tbingaman Timothy Bingaman added a comment - - edited This is affecting the Sectioned View Plugin as well (when it contains one or more List View Sections). I believe this is occurring because of the way List Views initialize the default columns. There is no StaplerRequest object available at the time of instantiation so they are calling d.newInstance(null,null) on the column Descriptor objects. The javadoc for this method states that StaplerRequest must always be non-null (yet the code is passing in null). The default columns bundled in Hudson get around this by overriding this method: @Override public ListViewColumn newInstance(StaplerRequest req, JSONObject formData) throws FormException { // This will be called with req == null also the Descriptor's doc tells you not. so the default impl fails return new LastDurationColumn(); } My assumption is that one of the additional columns provided by a plugin does not do this and that everyone seeing this issue has a plugin installed that provides an additional list view column. This is just speculation though as I haven't been able to duplicate the issue locally yet. It would help a lot if people seeing the issue could provide a list of plugins they have installed.

            Ok, finally duplicated this after installing the Claim plugin.

            Looks like someone has already fixed it, but no new release has been made since 1.6

            tbingaman Timothy Bingaman added a comment - Ok, finally duplicated this after installing the Claim plugin. Looks like someone has already fixed it, but no new release has been made since 1.6
            cbos Cees Bos added a comment -

            We have the Claim plugin installed as well (version 1.6). And we have this issue as well.

            cbos Cees Bos added a comment - We have the Claim plugin installed as well (version 1.6). And we have this issue as well.

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/hudson/main/core/src/main/java/hudson/model/Descriptor.java
            trunk/hudson/main/core/src/main/java/hudson/views/BuildButtonColumn.java
            trunk/hudson/main/core/src/main/java/hudson/views/JobColumn.java
            trunk/hudson/main/core/src/main/java/hudson/views/LastDurationColumn.java
            trunk/hudson/main/core/src/main/java/hudson/views/LastFailureColumn.java
            trunk/hudson/main/core/src/main/java/hudson/views/LastStableColumn.java
            trunk/hudson/main/core/src/main/java/hudson/views/LastSuccessColumn.java
            trunk/hudson/main/core/src/main/java/hudson/views/ListViewColumn.java
            trunk/hudson/main/core/src/main/java/hudson/views/StatusColumn.java
            trunk/hudson/main/core/src/main/java/hudson/views/WeatherColumn.java
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=25857
            Log:
            [FIXED JENKINS-5061] in 1.342. Avoids NPE even without having a help from a plugin. Also added a note about this contract violation of the newInstance method.

            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/model/Descriptor.java trunk/hudson/main/core/src/main/java/hudson/views/BuildButtonColumn.java trunk/hudson/main/core/src/main/java/hudson/views/JobColumn.java trunk/hudson/main/core/src/main/java/hudson/views/LastDurationColumn.java trunk/hudson/main/core/src/main/java/hudson/views/LastFailureColumn.java trunk/hudson/main/core/src/main/java/hudson/views/LastStableColumn.java trunk/hudson/main/core/src/main/java/hudson/views/LastSuccessColumn.java trunk/hudson/main/core/src/main/java/hudson/views/ListViewColumn.java trunk/hudson/main/core/src/main/java/hudson/views/StatusColumn.java trunk/hudson/main/core/src/main/java/hudson/views/WeatherColumn.java trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=25857 Log: [FIXED JENKINS-5061] in 1.342. Avoids NPE even without having a help from a plugin. Also added a note about this contract violation of the newInstance method.

            Sweet, thanks Kohsuke, that's a better fix

            Looks like the Claim plugin can be left as-is. When Hudson 1.342 is released it should start working again. Until then, temporarily disabling the Claim plugin should allow List Views to be created and Sectioned Views containing List View Sections to be saved.

            tbingaman Timothy Bingaman added a comment - Sweet, thanks Kohsuke, that's a better fix Looks like the Claim plugin can be left as-is. When Hudson 1.342 is released it should start working again. Until then, temporarily disabling the Claim plugin should allow List Views to be created and Sectioned Views containing List View Sections to be saved.

            (no more work to be done)

            rdesgroppes Régis Desgroppes added a comment - (no more work to be done)

            People

              Unassigned Unassigned
              cpatrick_netflix cpatrick_netflix
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: