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

after upgrading to 1.374 cannot modify global settings as it throws unhandled error

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Blocker
    • Resolution: Fixed
    • None
    • Windows 2003 R2 - hudson is running as a windows service

    Description

      I was trying to modify system administrator email address and save. When I click save I get the following stacktrace:

      [Winstone 2010/08/30 13:30:57] - Untrapped Error in Servlet
      javax.servlet.ServletException: java.lang.RuntimeException: Failed to serialize hudson.plugins.build_publisher.BuildPublisher$BuildPublisherDescriptor#publicInstances for class hudson.plugins.build_publisher.BuildPublisher$BuildPublisherDescriptor
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:569)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:450)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:132)
      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.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.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      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:173)
      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:66)
      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 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(Unknown Source)
      Caused by: java.lang.RuntimeException: Failed to serialize hudson.plugins.build_publisher.BuildPublisher$BuildPublisherDescriptor#publicInstances for class hudson.plugins.build_publisher.BuildPublisher$BuildPublisherDescriptor
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:167)
      at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:135)
      at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:130)
      at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:120)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:94)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
      at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:98)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:38)
      at com.thoughtworks.xstream.XStream.marshal(XStream.java:840)
      at com.thoughtworks.xstream.XStream.marshal(XStream.java:829)
      at com.thoughtworks.xstream.XStream.toXML(XStream.java:804)
      at hudson.XmlFile.write(XmlFile.java:165)
      at hudson.model.Descriptor.save(Descriptor.java:627)
      at hudson.plugins.build_publisher.BuildPublisher$BuildPublisherDescriptor.configure(BuildPublisher.java:187)
      at hudson.model.Hudson.configureDescriptor(Hudson.java:2431)
      at hudson.model.Hudson.doConfigSubmit(Hudson.java:2388)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:259)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:126)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:65)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:79)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:534)
      ... 39 more
      Caused by: java.lang.NullPointerException
      at java.lang.Class.isAssignableFrom(Native Method)
      at hudson.util.XStream2$1.serializedClass(XStream2.java:115)
      at com.thoughtworks.xstream.mapper.MapperWrapper.serializedClass(MapperWrapper.java:34)
      at com.thoughtworks.xstream.mapper.MapperWrapper.serializedClass(MapperWrapper.java:34)
      at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:58)
      at com.thoughtworks.xstream.converters.collections.ArrayConverter.marshal(ArrayConverter.java:45)
      at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
      at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
      at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:175)
      at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:163)
      ... 66 more

      Workaround: downgrade to 1.373

      Attachments

        Activity

          vjuranek vjuranek added a comment -

          I tried same environment (fresh installation of Hudson 1.374 with Build Publisher 1.9, Sun/Oracle Java 1.6.0_21-b06, CentOS 5.5) and still cannot reproduce I can reproduce only in case that I don't fill "URL" column in Build Publisher section of global configuration. Please, check that you have this column filled. What other plugins have you installed? Any suggestion, how to reproduce? Thanks

          vjuranek vjuranek added a comment - I tried same environment (fresh installation of Hudson 1.374 with Build Publisher 1.9, Sun/Oracle Java 1.6.0_21-b06, CentOS 5.5) and still cannot reproduce I can reproduce only in case that I don't fill "URL" column in Build Publisher section of global configuration. Please, check that you have this column filled. What other plugins have you installed? Any suggestion, how to reproduce? Thanks
          akiko_pusu akiko_pusu added a comment -

          Thank you for your time to confirm above.
          I'm in the same setting:
          > I can reproduce only in case that I don't fill "URL" column in Build Publisher section of global configuration.

          To tell the truth, I've made blank URL in Build Publisher section of global configuration.
          I stopped using this plugin for this reason, JENKINS-3802, http://issues.jenkins-ci.org/browse/JENKINS-3802.
          But blank url has no problem before Hudson 1.374 with Build Publisher 1.9.

          Anyway, I can edit hudson's global settig after filling url and so on.

          akiko_pusu akiko_pusu added a comment - Thank you for your time to confirm above. I'm in the same setting: > I can reproduce only in case that I don't fill "URL" column in Build Publisher section of global configuration. To tell the truth, I've made blank URL in Build Publisher section of global configuration. I stopped using this plugin for this reason, JENKINS-3802 , http://issues.jenkins-ci.org/browse/JENKINS-3802 . But blank url has no problem before Hudson 1.374 with Build Publisher 1.9. Anyway, I can edit hudson's global settig after filling url and so on.
          sogabe sogabe added a comment -

          attached BuildPublisher.patch

          It works for me.

          sogabe sogabe added a comment - attached BuildPublisher.patch It works for me.

          Code changed in hudson
          User: : vjuranek
          Path:
          trunk/hudson/plugins/build-publisher/src/main/java/hudson/plugins/build_publisher/BuildPublisher.java
          http://jenkins-ci.org/commit/34557
          Log:
          Switch from array to array list and appropriate changes, fix for JENKINS-7330

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : vjuranek Path: trunk/hudson/plugins/build-publisher/src/main/java/hudson/plugins/build_publisher/BuildPublisher.java http://jenkins-ci.org/commit/34557 Log: Switch from array to array list and appropriate changes, fix for JENKINS-7330
          vjuranek vjuranek added a comment -

          @sogabe: thanks for the patch! Patch was applied, now saving of the global config should work fine even if the URL is not filled in.

          vjuranek vjuranek added a comment - @sogabe: thanks for the patch! Patch was applied, now saving of the global config should work fine even if the URL is not filled in.

          People

            vjuranek vjuranek
            hanin77 hanin77
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: