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

Build.xml file missing for every builds using "Publish Klocwork test result report"

    XMLWordPrintable

Details

    Description

      I have a project which use the Klocwork plug-in to:

      • Build using a build specification
      • Publish Klocwork test result report (default klocwork_result.xml)

      Every times i restart Jenkins, the entire build history is lost for the project.

      In $HUDSON_HOME/jobs/MY_PROJECT/builds i can still access all the builds, but build.xml files are missing, and there are remaining tmp files in /workspace-files directory

      ------------
      Aug 14, 2012 5:57:23 PM hudson.model.Executor run
      SEVERE: Executor threw an exception
      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:177)
      at hudson.model.Run.save(Run.java:1624)
      at hudson.model.Run.execute(Run.java:1546)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)
      Caused by: java.lang.RuntimeException: Failed to serialize com.thalesgroup.hudson.plugins.klocwork.util.KloBuildLog#kloTables for class com.thalesgroup.hudson.plugins.klocwork.util.KloBuildLog
      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.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: com.thoughtworks.xstream.converters.ConversionException: Could not call hudson.FilePath.writeObject() : Can't send a remote FilePath to a different remote channel
      ---- Debugging information ----
      message : Could not call hudson.FilePath.writeObject()
      cause-exception : java.lang.IllegalStateException
      cause-message : Can't send a remote FilePath to a different remote channel
      -------------------------------
      at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteObject(SerializationMethodInvoker.java:104)
      at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:215)
      at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:58)
      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)
      ... 31 more
      Caused by: java.lang.IllegalStateException: Can't send a remote FilePath to a different remote channel
      at hudson.FilePath.writeObject(FilePath.java:2153)
      at sun.reflect.GeneratedMethodAccessor343.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteObject(SerializationMethodInvoker.java:100)
      ... 37 more
      Aug 14, 2012 5:57:22 PM hudson.model.Run execute
      -----------

      I tried to deactivate the "Publish Klocwork test result report". All the builds performed with this configuration are loaded and shown in the build history (build.xml file is present).

      Attachments

        Activity

          Have to change the priority as i have deactivated Klocwork plug-in because of this issue.

          geoffroyjabouley Geoffroy Jabouley added a comment - Have to change the priority as i have deactivated Klocwork plug-in because of this issue.
          steven_aerts Steven Aerts added a comment -

          I am seeing this problem too, it can be reproduced by running klocwork on a non-master node and enabling the "Parse Log" checkbox in your configuration.

          When the job is finished and tries to persis its build.xml, this exception will occur.

          steven_aerts Steven Aerts added a comment - I am seeing this problem too, it can be reproduced by running klocwork on a non-master node and enabling the "Parse Log" checkbox in your configuration. When the job is finished and tries to persis its build.xml , this exception will occur.

          I have the same issue as you.

          skrzynia Slawomir Skrzyniarz added a comment - I have the same issue as you.

          Steven please vote if issue is still present.

          skrzynia Slawomir Skrzyniarz added a comment - Steven please vote if issue is still present.
          davidruhmann David Ruhmann added a comment -

          This Klocwork exception issue is affecting my builds as well on non-master nodes. The build.xml is not being generated, thus causing the build to not be seen by Jenkins and invoking constant rebuilding of a job because it does not know it succeeded.

          • Windows Server 2008 R2
          • Jenkins 1.571 (Tomcat 7 on Java 8u5 64-bit)
          • Klocwork Plugin 1.15 (Klocwork 10.0.3)
          davidruhmann David Ruhmann added a comment - This Klocwork exception issue is affecting my builds as well on non-master nodes. The build.xml is not being generated, thus causing the build to not be seen by Jenkins and invoking constant rebuilding of a job because it does not know it succeeded. Windows Server 2008 R2 Jenkins 1.571 (Tomcat 7 on Java 8u5 64-bit) Klocwork Plugin 1.15 (Klocwork 10.0.3)
          davidruhmann David Ruhmann added a comment -

          I have verified that unchecking the Parse Log option fixes the issue with build.xml as mentioned by Steven.

          davidruhmann David Ruhmann added a comment - I have verified that unchecking the Parse Log option fixes the issue with build.xml as mentioned by Steven.
          davidruhmann David Ruhmann added a comment -

          This is both an issue with the Parse Log and Build Log.

          Source Code:

          • KloParseErrorsLog.java Line:43
            public KloParseErrorsLog(AbstractBuild<?, ?> owner) {
                this.owner = owner;
                this.kloTables = new FilePath(new FilePath(new FilePath(owner.getWorkspace(), "kloTables"),
                        owner.getId()), "parse_errors.log");
            }
            
          • KloBuildLog.java Line:41
            public KloBuildLog(AbstractBuild<?, ?> owner) {
                this.owner = owner;
                this.kloTables = new FilePath(new FilePath(new FilePath(owner.getWorkspace(), "kloTables"),
                        owner.getId()), "build.log");
            }
            
          davidruhmann David Ruhmann added a comment - This is both an issue with the Parse Log and Build Log. Source Code: KloParseErrorsLog.java Line:43 public KloParseErrorsLog(AbstractBuild<?, ?> owner) { this .owner = owner; this .kloTables = new FilePath( new FilePath( new FilePath(owner.getWorkspace(), "kloTables" ), owner.getId()), "parse_errors.log" ); } KloBuildLog.java Line:41 public KloBuildLog(AbstractBuild<?, ?> owner) { this .owner = owner; this .kloTables = new FilePath( new FilePath( new FilePath(owner.getWorkspace(), "kloTables" ), owner.getId()), "build.log" ); }

          People

            gbois Gregory Boissinot
            geoffroyjabouley Geoffroy Jabouley
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: