Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Firefox 3.6

      Description

      When you create a view without selecting the view's mode and you validate the form pressing the "enter key", you get an NullPointerException :

      Status Code: 500
      java.lang.NullPointerException
      at hudson.model.View.create(View.java:683)
      at hudson.model.Hudson.doCreateView(Hudson.java:2603)
      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:616)
      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:519)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:435)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:123)
      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:636)

      Step to reproduce :

      • Go to the newView page ;
      • Enter a name for the view ;
      • Press [Enter] key.

      When the form is validated, the button "Ok" is disabled.

        Activity

        lafeuil lafeuil created issue -
        Hide
        mdonohue mdonohue added a comment -

        What version of Hudson are you using?

        Show
        mdonohue mdonohue added a comment - What version of Hudson are you using?
        Hide
        lafeuil lafeuil added a comment -

        The last : Hudson ver. 1.343.

        Show
        lafeuil lafeuil added a comment - The last : Hudson ver. 1.343.
        mindless Alan Harder made changes -
        Field Original Value New Value
        Assignee mindless [ mindless ]
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in hudson
        User: : mindless
        Path:
        trunk/hudson/main/core/src/main/java/hudson/model/View.java
        trunk/www/changelog.html
        http://jenkins-ci.org/commit/27057
        Log:
        [FIXED JENKINS-5469] avoid NPE and show better error message if view type is missing
        when creating a view (can be done by submitting form with enter key.. the OK button
        is disabled)

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/model/View.java trunk/www/changelog.html http://jenkins-ci.org/commit/27057 Log: [FIXED JENKINS-5469] avoid NPE and show better error message if view type is missing when creating a view (can be done by submitting form with enter key.. the OK button is disabled)
        scm_issue_link SCM/JIRA link daemon made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in hudson
        User: : mindless
        Path:
        trunk/hudson/main/core/src/main/resources/hudson/model/Messages.properties
        http://jenkins-ci.org/commit/27095
        Log:
        JENKINS-5469 file forgotten in r27057

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/resources/hudson/model/Messages.properties http://jenkins-ci.org/commit/27095 Log: JENKINS-5469 file forgotten in r27057
        abayer abayer made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        ircbot IRCbot Run by Kohsuke made changes -
        Component/s core [ 15593 ]
        Component/s gui [ 15492 ]

          People

          • Assignee:
            mindless Alan Harder
            Reporter:
            lafeuil lafeuil
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: