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

manage old data fails with RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • envinject-plugin
    • None
    • Jenkins 1.451 or 1.456, EnvInject 1.42

      I removed the Emotional Jenkins plugin and now have "old data" in my config. I am presented with the manage ui, but when I choose "discard unreadable data" I get a RuntimeException.

      Old data that it is warning on:
      CannotResolveClassException: org.jenkinsci.plugins.emotional_jenkins.EmotionalJenkinsAction : org.jenkinsci.plugins.emotional_jenkins.EmotionalJenkinsAction

      urL administrativeMonitor/OldData/discard

      As much stack as I can find:

      java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild
      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:173)
      at hudson.model.Run.save(Run.java:1545)
      at hudson.diagnosis.OldDataMonitor.doDiscard(OldDataMonitor.java:274)
      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:282)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:563)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:185)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:159)
      at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:86)
      at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      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:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.lang.Thread.run(Unknown Source)
      Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Could not call org.jenkinsci.plugins.envinject.EnvInjectAction.writeReplace() : null
      at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:70)
      at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:88)
      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.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
      at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)
      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)
      ... 60 more
      Caused by: java.lang.NullPointerException
      at org.jenkinsci.plugins.envinject.EnvInjectAction.writeReplace(EnvInjectAction.java:67)
      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 com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:66)
      ... 71 more

          [JENKINS-12878] manage old data fails with RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild

          We're seeing something similar, it appears to be related.

          The disk usage plugin chokes on all jobs that have an EnvInject step with the same stack as below:
          WARNING: Error when recording disk usage for XXX_Trunk
          java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild
          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:173)
          at hudson.model.Run.save(Run.java:1546)
          at hudson.plugins.disk_usage.DiskUsageThread.calculateDiskUsageForBuild(DiskUsageThread.java:100)
          at hudson.plugins.disk_usage.DiskUsageThread.execute(DiskUsageThread.java:66)
          at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:52)
          at java.lang.Thread.run(Unknown Source)
          Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Could not call org.jenkinsci.plugins.envinject.EnvInjectAction.writeReplace() : null
          at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:70)
          at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:88)
          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.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
          at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)
          at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
          at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
          at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:176)
          at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:163)
          ... 18 more
          Caused by: java.lang.NullPointerException
          at org.jenkinsci.plugins.envinject.EnvInjectAction.writeReplace(EnvInjectAction.java:67)
          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 com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:66)
          ... 28 more

          Gabriele Giuseppini added a comment - We're seeing something similar, it appears to be related. The disk usage plugin chokes on all jobs that have an EnvInject step with the same stack as below: WARNING: Error when recording disk usage for XXX_Trunk java.lang.RuntimeException: Failed to serialize hudson.model.Actionable#actions for class hudson.model.FreeStyleBuild 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:173) at hudson.model.Run.save(Run.java:1546) at hudson.plugins.disk_usage.DiskUsageThread.calculateDiskUsageForBuild(DiskUsageThread.java:100) at hudson.plugins.disk_usage.DiskUsageThread.execute(DiskUsageThread.java:66) at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:52) at java.lang.Thread.run(Unknown Source) Caused by: com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Could not call org.jenkinsci.plugins.envinject.EnvInjectAction.writeReplace() : null at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:70) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:88) 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.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:176) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:163) ... 18 more Caused by: java.lang.NullPointerException at org.jenkinsci.plugins.envinject.EnvInjectAction.writeReplace(EnvInjectAction.java:67) 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 com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:66) ... 28 more

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectAction.java
          http://jenkins-ci.org/commit/envinject-plugin/758114315ec525d37179cb1266e5e30a989e7b4e
          Log:
          Fix JENKINS-12878

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectAction.java http://jenkins-ci.org/commit/envinject-plugin/758114315ec525d37179cb1266e5e30a989e7b4e Log: Fix JENKINS-12878

          It should be resolved in 1.48

          Gregory Boissinot added a comment - It should be resolved in 1.48

            gbois Gregory Boissinot
            trbaker Trevor Baker
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: