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

Cannot save changes in System Configuration

    XMLWordPrintable

    Details

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

      Description

      When making changes to System Configuration.
      eg. Trying to delete a offline slave. I get a error when submitting.

      Error as follows:
      HTTP Status 500 -

      type Exception report

      message

      description The server encountered an internal error () that prevented it from
      fulfilling this request.

      exception

      javax.servlet.ServletException: Unable to convert to class hudson.model.Node$Mode
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:440)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:359)
      org.kohsuke.stapler.Stapler.service(Stapler.java:119)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:52)
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:28)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:42)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:44)
      hudson.security.HudsonFilter.doFilter(HudsonFilter.java:85)

      root cause

      java.lang.IllegalArgumentException: Unable to convert to class
      hudson.model.Node$Mode
      org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:262)
      hudson.model.Hudson.doConfigSubmit(Hudson.java:1430)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:103)
      org.kohsuke.stapler.Function.bindAndinvoke(Function.java:57)
      org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:431)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:359)
      org.kohsuke.stapler.Stapler.service(Stapler.java:119)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:52)
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:28)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:42)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:44)
      hudson.security.HudsonFilter.doFilter(HudsonFilter.java:85)

      note The full stack trace of the root cause is available in the Apache
      Tomcat/5.5.25 logs.

      ------------------------
      Tomcat Log
      ---------------------------------------
      SEVERE: Error while serving http://pc1576.aus.optiver.com/hudson/configSubmit
      java.lang.reflect.InvocationTargetException
      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: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:431)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:359)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:119)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:52)
      at
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:28)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:42)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:44)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:85)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
      at
      org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at
      org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at
      org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at
      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: Unable to convert to class
      hudson.model.Node$Mode
      at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:262)
      at hudson.model.Hudson.doConfigSubmit(Hudson.java:1430)
      ... 47 more
      16/05/2008 09:44:03 org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet Stapler threw exception
      java.lang.IllegalArgumentException: Unable to convert to class
      hudson.model.Node$Mode
      at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:262)
      at hudson.model.Hudson.doConfigSubmit(Hudson.java:1430)
      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: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:431)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:359)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:119)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:52)
      at
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:28)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:42)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:55)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:44)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:85)
      at
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      at
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      at
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      at
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
      at
      org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      at
      org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      at
      org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      at
      org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
      at java.lang.Thread.run(Thread.java:619)

        Attachments

          Issue Links

            Activity

            Hide
            stephenconnolly Stephen Connolly added a comment -

            The root cause is this change in stapler:

            https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/RequestImpl.java?rev=1.39&r1=1.36&r2=1.37

            Basically, everywhere you used to have

            ConvertUtils.register(...)

            we now need

            Stapler.CONVERT_UTILS.register(...)

            This will affect all the plugins.

            I hesitate to fix it as it's realy a regression in Stapler (which perhaps should
            have avoided switching to a static converter (is that a valid thread safe
            assumption?)

            I would question that one cannot guarantee that all converters registered by any
            plugin are thread safe... therefore IMHO it is not safe for Stapler to use a
            singleton

            Show
            stephenconnolly Stephen Connolly added a comment - The root cause is this change in stapler: https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/RequestImpl.java?rev=1.39&r1=1.36&r2=1.37 Basically, everywhere you used to have ConvertUtils.register(...) we now need Stapler.CONVERT_UTILS.register(...) This will affect all the plugins. I hesitate to fix it as it's realy a regression in Stapler (which perhaps should have avoided switching to a static converter (is that a valid thread safe assumption?) I would question that one cannot guarantee that all converters registered by any plugin are thread safe... therefore IMHO it is not safe for Stapler to use a singleton
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Looking further. This may not be the threading issue, but it is certainly a
            breaker for all plugins that used ConvertUtils.register

            Show
            stephenconnolly Stephen Connolly added a comment - Looking further. This may not be the threading issue, but it is certainly a breaker for all plugins that used ConvertUtils.register
            Show
            stephenconnolly Stephen Connolly added a comment - Also this change is related: https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/Stapler.java?rev=1.62&r1=1.60&r2=1.61
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/www/changelog.html
            http://fisheye4.cenqua.com/changelog/hudson/?cs=9303
            Log:
            [fixed]
            JENKINS-1704
            In 1.215. This was due to an incompatible stapler change

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/www/changelog.html http://fisheye4.cenqua.com/changelog/hudson/?cs=9303 Log: [fixed] JENKINS-1704 In 1.215. This was due to an incompatible stapler change
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in stapler
            User: kohsuke
            Path:
            /stapler/stapler/src/org/kohsuke/stapler/RequestImpl.java (1.40)
            https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/RequestImpl.java?r1=1.39&r2=1.40
            /stapler/stapler/src/org/kohsuke/stapler/AnnotationHandler.java (1.3)
            https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/AnnotationHandler.java?r1=1.2&r2=1.3
            /stapler/stapler/src/org/kohsuke/stapler/Stapler.java (1.63)
            https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/Stapler.java?r1=1.62&r2=1.63

            Log:
            fixed a regression of JENKINS-1704. We should still look at ConverterUtil.lookup to remain compatible with the earlier behavior.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in stapler User: kohsuke Path: /stapler/stapler/src/org/kohsuke/stapler/RequestImpl.java (1.40) https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/RequestImpl.java?r1=1.39&r2=1.40 /stapler/stapler/src/org/kohsuke/stapler/AnnotationHandler.java (1.3) https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/AnnotationHandler.java?r1=1.2&r2=1.3 /stapler/stapler/src/org/kohsuke/stapler/Stapler.java (1.63) https://stapler.dev.java.net/source/browse/stapler/stapler/src/org/kohsuke/stapler/Stapler.java?r1=1.62&r2=1.63 Log: fixed a regression of JENKINS-1704 . We should still look at ConverterUtil.lookup to remain compatible with the earlier behavior.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in hudson
            User: : kohsuke
            Path:
            trunk/hudson/main/core/pom.xml
            http://fisheye4.cenqua.com/changelog/hudson/?cs=9305
            Log:
            Integrating stapler 1.71 to pick up a proper fix for JENKINS-1704

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/pom.xml http://fisheye4.cenqua.com/changelog/hudson/?cs=9305 Log: Integrating stapler 1.71 to pick up a proper fix for JENKINS-1704
            Hide
            stephenconnolly Stephen Connolly added a comment -
                • Issue 1702 has been marked as a duplicate of this issue. ***
            Show
            stephenconnolly Stephen Connolly added a comment - Issue 1702 has been marked as a duplicate of this issue. ***

              People

              Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              rajp rajp
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: