Some model objects which are written at top level to their own XML file. The most important examples are AbstractItem, Run, and User.

      Sometimes various classes defined in Jenkins which are intended to be serialized via XStream will mistakenly declare a non-transient field referring back to the model object. If the class happens to be an action, property, etc. which is contained in that same model object, this will usually be harmless, as XStream will create a reference—though it will occasionally blow up in your face when using lazy loading of builds, since there are conditions under which a fresh copy of the model object will be written, which will typically be in some inconsistent state after deserialization since no onLoad method has been called on it. If the class is contained in something else, you will definitely get duplicated data, which can be rather bad.

      Jenkins should if possible block you from accidentally storing a model object inside something else.

          [JENKINS-45892] Forbid nested references to model objects

          Oleg Nenashev added a comment -

          The fix has been integrated towards 2.74. Marking as LTS Candidate

          Oleg Nenashev added a comment - The fix has been integrated towards 2.74. Marking as LTS Candidate

          Oleg Nenashev added a comment -

          jglick oops, it's an improvement. WDYT, does it make sense to backport it. Maybe too much risk

          Oleg Nenashev added a comment - jglick oops, it's an improvement. WDYT, does it make sense to backport it. Maybe too much risk

          Jesse Glick added a comment -

          Too risky I think.

          Jesse Glick added a comment - Too risky I think.

          R. Tyler Croy added a comment -

          I see warnings about this quite a bit from some more bleeding edge instances I operate:

           

          JENKINS-45892: reference to org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@6904a9b5[CodeValet/sentry-plugin] being saved but not at top level

          These Pipelines were created within the last 24 hours on 2.75-SNAPSHOT, is this something to be concerned about? Or just going to keep warning until one of the related tickets is resolved?

          R. Tyler Croy added a comment - I see warnings about this quite a bit from some more bleeding edge instances I operate:   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@6904a9b5[CodeValet/sentry-plugin] being saved but not at top level These Pipelines were created within the last 24 hours on 2.75-SNAPSHOT, is this something to be concerned about? Or just going to keep warning until one of the related tickets is resolved?

          Jesse Glick added a comment -

          rtyler absolutely something to be concerned about. If you can reproduce from scratch please open a linked issue. If not, examining the config.xml of that job might yield a clue, though not necessarily—could be being saved from somewhere else entirely. (As noted in the PR, for technical reasons I did not manage to improve the warning message to show the actual culprit. Might be possible with some more exotic XStream tricks but I am not sure.)

          Jesse Glick added a comment - rtyler absolutely something to be concerned about. If you can reproduce from scratch please open a linked issue. If not, examining the config.xml of that job might yield a clue, though not necessarily—could be being saved from somewhere else entirely. (As noted in the PR, for technical reasons I did not manage to improve the warning message to show the actual culprit. Might be possible with some more exotic XStream tricks but I am not sure.)

          R. Tyler Croy added a comment -

          Well that makes me feel much more concerned. I will have to see what I can do

          R. Tyler Croy added a comment - Well that makes me feel much more concerned. I will have to see what I can do

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/XmlFile.java
          test/src/test/java/hudson/model/AbstractItem2Test.java
          http://jenkins-ci.org/commit/jenkins/a032c59e069a1d20bc03692d351d2620e52bd1e8
          Log:
          JENKINS-45892 Enhanced diagnostics (#2997)

          • Refined fix which should avoid a needless warning when called from MultiBranchProject.onLoad.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/XmlFile.java test/src/test/java/hudson/model/AbstractItem2Test.java http://jenkins-ci.org/commit/jenkins/a032c59e069a1d20bc03692d351d2620e52bd1e8 Log: JENKINS-45892 Enhanced diagnostics (#2997) JENKINS-45892 Enhanced diagnostics. Refined fix which should avoid a needless warning when called from MultiBranchProject.onLoad.

          Emil Styrke added a comment -

          jglick - I reported a reproducible (I hope) case in JENKINS-47158, though not sure if it's the same case as rtyler experienced.

          Emil Styrke added a comment - jglick - I reported a reproducible (I hope) case in  JENKINS-47158 , though not sure if it's the same case as rtyler  experienced.

          Reinhold Füreder added a comment - - edited

          Yesterday late afternoon a lot of equal exceptions referencing this issue popped up during the execution of exactly two different builds (in between those builds were one other build without such logs):

          • 219 times:
            • WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@16e0186a[ACME-Docker-Image] being saved from unexpected /var/lib/jenkins/jobs/ACME-Docker-Image/builds/19/build.xml
          • 104 times:
            • WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@1662ab0b[ACME-Pipeline (Branch)] being saved from unexpected /var/lib/jenkins/jobs/ACME-Pipeline (Branch)/builds/576/build.xml

          The whole exception stacktrace (it is always the same for all 323 occurrences => massive log spam):

          2017-12-13 16:21:44 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@16e0186a[ACME-Docker-Image] being saved from unexpected /var/lib/jenkins/jobs/ACME-Docker-Image/builds/19/build.xml
          java.lang.IllegalStateException
                  at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:208)
                  at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:498)
                  at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
                  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
                  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
                  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
                  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
                  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
                  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
                  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
                  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
                  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
                  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
                  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
                  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
                  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
                  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
                  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
                  at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
                  at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
                  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
                  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
                  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
                  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
                  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
                  at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
                  at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
                  at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
                  at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
                  at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
                  at hudson.XmlFile.write(XmlFile.java:179)
                  at hudson.model.Run.save(Run.java:1923)
                  at hudson.util.PersistedList.onModified(PersistedList.java:173)
                  at hudson.util.PersistedList._onModified(PersistedList.java:181)
                  at hudson.util.PersistedList.add(PersistedList.java:72)
                  at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:819)
                  at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1500(WorkflowRun.java:134)
                  at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1002)
                  at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:127)
                  at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
                  at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:59)
                  at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:262)
                  at hudson.model.ResourceController.execute(ResourceController.java:97)
                  at hudson.model.Executor.run(Executor.java:429)

           

          Details for builds:

          1. ACME-Docker-Image build #19
            • running from 16:21:43 - 16:34:43
            • first exception log: 2017-12-13 16:21:44 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@16e0186a[ACME-Docker-Image] being saved from unexpected /var/lib/jenkins/jobs/ACME-Docker-Image/builds/19/build.xml
            • last exception log: 2017-12-13 16:34:43 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@16e0186a[ACME-Docker-Image] being saved from unexpected /var/lib/jenkins/jobs/ACME-Docker-Image/builds/19/build.xml
          2. ACME-Pipeline (Branch) build #576
            • running from 16:55:51 - 17:00:01
            • first exception log: 2017-12-13 16:55:53 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@1662ab0b[ACME-Pipeline (Branch)] being saved from unexpected /var/lib/jenkins/jobs/ACME-Pipeline (Branch)/builds/576/build.xml
            • last exception log: 2017-12-13 17:00:01 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@1662ab0b[ACME-Pipeline (Branch)] being saved from unexpected /var/lib/jenkins/jobs/ACME-Pipeline (Branch)/builds/576/build.xml

          It does not happen anymore, i.e. it is not re-producible so far.

          Side notes: I did update some Jenkins plugins yesterday in the morning and newly installed the 'Plot' plugin (2.0.0); and started using 'browser' property of 'checkout' step (using WebSVN2) based on a fix in Subversion plugin v2.10 (also in the morning).

          Most important plugin updates:

          • script-security:1.39 (was: 1.36)
          • pipeline-build-step:2.6 (was: 2.5.1)
          • docker-commons:1.10 (was: 1.9)
          • subversion:2.10.1 (was: 2.9)
          • blueocean:1.3.5 (was: 1.3.4)
          • blueocean-pipeline-editor:1.3.5 (was: 1.3.4)

          And also:

          • ssh-slaves:1.23 (was: 1.22)
          • Command Agent Launcher

          Reinhold Füreder added a comment - - edited Yesterday late afternoon a lot of equal exceptions referencing this issue popped up during the execution of exactly two different builds (in between those builds were one other build without such logs) : 219 times: WARNING [hudson.XmlFile replaceIfNotAtTopLevel]    JENKINS-45892 : reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@16e0186a [ACME-Docker-Image] being saved from unexpected /var/lib/jenkins/jobs/ACME-Docker-Image/builds/19/build.xml 104 times: WARNING [hudson.XmlFile replaceIfNotAtTopLevel]    JENKINS-45892 : reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@1662ab0b [ACME-Pipeline (Branch)] being saved from unexpected /var/lib/jenkins/jobs/ACME-Pipeline (Branch)/builds/576/build.xml The whole exception stacktrace (it is always the same for all 323 occurrences => massive log spam) : 2017-12-13 16:21:44 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@16e0186a[ACME-Docker-Image] being saved from unexpected /var/lib/jenkins/jobs/ACME-Docker-Image/builds/19/build.xml java.lang.IllegalStateException         at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:208)         at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.lang.reflect.Method.invoke(Method.java:498)         at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)         at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)         at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)         at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)         at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)         at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)         at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)         at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)         at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)         at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)         at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)         at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)         at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)         at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)         at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)         at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)         at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)         at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)         at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)         at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)         at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)         at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)         at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)         at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)         at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)         at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)         at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)         at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)         at hudson.XmlFile.write(XmlFile.java:179)         at hudson.model.Run.save(Run.java:1923)         at hudson.util.PersistedList.onModified(PersistedList.java:173)         at hudson.util.PersistedList._onModified(PersistedList.java:181)         at hudson.util.PersistedList.add(PersistedList.java:72)         at org.jenkinsci.plugins.workflow.job.WorkflowRun.onCheckout(WorkflowRun.java:819)         at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$1500(WorkflowRun.java:134)         at org.jenkinsci.plugins.workflow.job.WorkflowRun$SCMListenerImpl.onCheckout(WorkflowRun.java:1002)         at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:127)         at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)         at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:59)         at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:262)         at hudson.model.ResourceController.execute(ResourceController.java:97)         at hudson.model.Executor.run(Executor.java:429)   Details for builds: ACME-Docker-Image build #19 running from 16:21:43 - 16:34:43 first exception log: 2017-12-13 16:21:44 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]    JENKINS-45892 : reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@16e0186a [ACME-Docker-Image] being saved from unexpected /var/lib/jenkins/jobs/ACME-Docker-Image/builds/19/build.xml last exception log: 2017-12-13 16:34:43 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]    JENKINS-45892 : reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@16e0186a [ACME-Docker-Image] being saved from unexpected /var/lib/jenkins/jobs/ACME-Docker-Image/builds/19/build.xml ACME-Pipeline (Branch) build #576 running from 16:55:51 - 17:00:01 first exception log: 2017-12-13 16:55:53 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]    JENKINS-45892 : reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@1662ab0b [ACME-Pipeline (Branch)] being saved from unexpected /var/lib/jenkins/jobs/ACME-Pipeline (Branch)/builds/576/build.xml last exception log: 2017-12-13 17:00:01 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]    JENKINS-45892 : reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@1662ab0b [ACME-Pipeline (Branch)] being saved from unexpected /var/lib/jenkins/jobs/ACME-Pipeline (Branch)/builds/576/build.xml It does not happen anymore, i.e. it is not re-producible so far. Side notes: I did update some Jenkins plugins yesterday in the morning and newly installed the 'Plot' plugin (2.0.0); and started using 'browser' property of 'checkout' step (using WebSVN2) based on a fix in Subversion plugin v2.10 (also in the morning). Most important plugin updates: script-security:1.39 (was: 1.36) pipeline-build-step:2.6 (was: 2.5.1) docker-commons:1.10 (was: 1.9) subversion:2.10.1 (was: 2.9) blueocean:1.3.5 (was: 1.3.4) blueocean-pipeline-editor:1.3.5 (was: 1.3.4) And also: ssh-slaves:1.23 (was: 1.22) Command Agent Launcher

          This happened again today for one single (scripted pipeline) build (but again for the whole duration of this build):

          2017-12-20 10:23:42 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]   JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@24ac6475[ACME-Pipeline] b
          eing saved from unexpected /var/lib/jenkins/jobs/ACME-Pipeline/builds/1616/build.xml

          Reinhold Füreder added a comment - This happened again today for one single (scripted pipeline) build (but again for the whole duration of this build): 2017-12-20 10:23:42 WARNING [hudson.XmlFile replaceIfNotAtTopLevel]    JENKINS-45892 : reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@24ac6475 [ACME-Pipeline] b eing saved from unexpected /var/lib/jenkins/jobs/ACME-Pipeline/builds/1616/build.xml

          Roman Pickl added a comment - - edited

          We experience a similar error since Dec 07, 2017 with all our multibranch jobs (I guess after a jenkins LTS Update).

          Dec 17, 2017 6:56:02 AM hudson.XmlFile replaceIfNotAtTopLevel
          WARNING: JENKINS-45892: reference to org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@13492c3a[project] being saved from unexpected /var/lib/jenkins/jobs/project/indexing/indexing.xml
          java.lang.IllegalStateException
                  at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:210)
                  at hudson.model.AbstractItem.writeReplace(AbstractItem.java:509)
                  at sun.reflect.GeneratedMethodAccessor408.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:498)
                  at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
                  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
                  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
                  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
                  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
                  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
                  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
                  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
                  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
                  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
                  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
                  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
                  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
                  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
                  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
                  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
                  at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
                  at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
                  at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
                  at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
                  at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
                  at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
                  at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
                  at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
                  at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
                  at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
                  at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
                  at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
                  at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
                  at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
                  at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
                  at hudson.XmlFile.write(XmlFile.java:181)
                  at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.save(FolderComputation.java:208)
                  at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:192)
                  at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1004)
                  at hudson.model.ResourceController.execute(ResourceController.java:97)
                  at hudson.model.Executor.run(Executor.java:421)

          Dec 17, 2017 6:56:02 AM jenkins.branch.MultiBranchProject$BranchIndexing run

          Roman Pickl added a comment - - edited We experience a similar error since Dec 07, 2017 with all our multibranch jobs (I guess after a jenkins LTS Update). Dec 17, 2017 6:56:02 AM hudson.XmlFile replaceIfNotAtTopLevel WARNING: JENKINS-45892 : reference to org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@13492c3a [project] being saved from unexpected /var/lib/jenkins/jobs/project/indexing/indexing.xml java.lang.IllegalStateException         at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:210)         at hudson.model.AbstractItem.writeReplace(AbstractItem.java:509)         at sun.reflect.GeneratedMethodAccessor408.invoke(Unknown Source)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)         at java.lang.reflect.Method.invoke(Method.java:498)         at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)         at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)         at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)         at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)         at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)         at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)         at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)         at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)         at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)         at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)         at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)         at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)         at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)         at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)         at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)         at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)         at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)         at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)         at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)         at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)         at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)         at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)         at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)         at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)         at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)         at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)         at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)         at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)         at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)         at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)         at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)         at hudson.XmlFile.write(XmlFile.java:181)         at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.save(FolderComputation.java:208)         at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:192)         at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1004)         at hudson.model.ResourceController.execute(ResourceController.java:97)         at hudson.model.Executor.run(Executor.java:421) Dec 17, 2017 6:56:02 AM jenkins.branch.MultiBranchProject$BranchIndexing run

          Roman Pickl added a comment -

          I found out that my issue is related to JENKINS-48322

          Roman Pickl added a comment - I found out that my issue is related to JENKINS-48322

          Andrew Miller added a comment - - edited

          I'm still getting warnings about this on 2.101 for quite a few of our jobs. Mostly they're the same stacktrace, so I'll just post those. I'm not sure what is the issue. We had 59 instances of the warning today. I only have logs back to 2017/10/05, but I've found the first time that this warning appeared for us was on 2017/10/18 and only increased tenfold from 2017/11/08. The decrease in recent days is due to an unrelated issue where my Bitbucket account has been locked due to company password change regulations and unable to run jobs as we normally do.

           

          I tried making a brand new instance of Jenkins with only the default plugins + blue ocean installed on my local machine and recreated the same Bitbucket project organization folder, but the warning still persists.

           

          Number of warnings:

          $ for file in $(find . -name 'jenkins.log-*.gz' | sort); do echo $file; zcat $file | \grep 'WARNING: JENKINS-45892' | wc -l; done
          ./jenkins.log-20171005.gz
          0
          ./jenkins.log-20171006.gz
          0
          ./jenkins.log-20171007.gz
          0
          ./jenkins.log-20171008.gz
          0
          ./jenkins.log-20171009.gz
          0
          ./jenkins.log-20171010.gz
          0
          ./jenkins.log-20171011.gz
          0
          ./jenkins.log-20171012.gz
          0
          ./jenkins.log-20171013.gz
          0
          ./jenkins.log-20171014.gz
          0
          ./jenkins.log-20171015.gz
          0
          ./jenkins.log-20171016.gz
          0
          ./jenkins.log-20171017.gz
          0
          ./jenkins.log-20171018.gz
          1
          ./jenkins.log-20171019.gz
          11
          ./jenkins.log-20171020.gz
          2
          ./jenkins.log-20171021.gz
          0
          ./jenkins.log-20171022.gz
          0
          ./jenkins.log-20171023.gz
          0
          ./jenkins.log-20171024.gz
          0
          ./jenkins.log-20171025.gz
          0
          ./jenkins.log-20171026.gz
          1
          ./jenkins.log-20171027.gz
          0
          ./jenkins.log-20171028.gz
          1
          ./jenkins.log-20171029.gz
          0
          ./jenkins.log-20171030.gz
          0
          ./jenkins.log-20171031.gz
          0
          ./jenkins.log-20171101.gz
          0
          ./jenkins.log-20171102.gz
          0
          ./jenkins.log-20171103.gz
          0
          ./jenkins.log-20171104.gz
          0
          ./jenkins.log-20171105.gz
          0
          ./jenkins.log-20171106.gz
          0
          ./jenkins.log-20171107.gz
          0
          ./jenkins.log-20171108.gz
          5613
          ./jenkins.log-20171109.gz
          10878
          ./jenkins.log-20171110.gz
          10649
          ./jenkins.log-20171111.gz
          10814
          ./jenkins.log-20171112.gz
          12205
          ./jenkins.log-20171113.gz
          11981
          ./jenkins.log-20171114.gz
          10961
          ./jenkins.log-20171115.gz
          10503
          ./jenkins.log-20171116.gz
          11223
          ./jenkins.log-20171117.gz
          11764
          ./jenkins.log-20171118.gz
          12450
          ./jenkins.log-20171119.gz
          13688
          ./jenkins.log-20171120.gz
          14382
          ./jenkins.log-20171121.gz
          12412
          ./jenkins.log-20171122.gz
          13281
          ./jenkins.log-20171123.gz
          11389
          ./jenkins.log-20171124.gz
          13503
          ./jenkins.log-20171125.gz
          12543
          ./jenkins.log-20171126.gz
          14083
          ./jenkins.log-20171127.gz
          14191
          ./jenkins.log-20171128.gz
          12533
          ./jenkins.log-20171129.gz
          12637
          ./jenkins.log-20171130.gz
          12611
          ./jenkins.log-20171201.gz
          12167
          ./jenkins.log-20171202.gz
          11967
          ./jenkins.log-20171203.gz
          14851
          ./jenkins.log-20171204.gz
          14351
          ./jenkins.log-20171205.gz
          12500
          ./jenkins.log-20171206.gz
          12302
          ./jenkins.log-20171207.gz
          13187
          ./jenkins.log-20171208.gz
          12828
          ./jenkins.log-20171209.gz
          13331
          ./jenkins.log-20171210.gz
          15298
          ./jenkins.log-20171211.gz
          15727
          ./jenkins.log-20171212.gz
          13240
          ./jenkins.log-20171213.gz
          13026
          ./jenkins.log-20171214.gz
          13550
          ./jenkins.log-20171215.gz
          13266
          ./jenkins.log-20171216.gz
          15347
          ./jenkins.log-20171217.gz
          18802
          ./jenkins.log-20171218.gz
          18977
          ./jenkins.log-20171219.gz
          17406
          ./jenkins.log-20171220.gz
          18594
          ./jenkins.log-20171221.gz
          17566
          ./jenkins.log-20171222.gz
          18294
          ./jenkins.log-20171223.gz
          19136
          ./jenkins.log-20171224.gz
          20323
          ./jenkins.log-20171225.gz
          20590
          ./jenkins.log-20171226.gz
          18471
          ./jenkins.log-20171227.gz
          18590
          ./jenkins.log-20171228.gz
          19305
          ./jenkins.log-20171229.gz
          19555
          ./jenkins.log-20171230.gz
          20559
          ./jenkins.log-20171231.gz
          22201
          ./jenkins.log-20180101.gz
          20821
          ./jenkins.log-20180102.gz
          21154
          ./jenkins.log-20180103.gz
          21422
          ./jenkins.log-20180104.gz
          21617
          ./jenkins.log-20180105.gz
          21129
          ./jenkins.log-20180106.gz
          21148
          ./jenkins.log-20180107.gz
          21134
          ./jenkins.log-20180108.gz
          21065
          ./jenkins.log-20180109.gz
          8906
          ./jenkins.log-20180110.gz
          1995
          ./jenkins.log-20180111.gz
          71

           

          Freestyle Project

          Jan 11, 2018 2:33:41 PM hudson.XmlFile replaceIfNotAtTopLevel
          WARNING: JENKINS-45892: reference to hudson.model.FreeStyleProject@1fd2586f[freestyle_job_name] being saved from unexpected /var/lib/jenkins/jobs/freestyle_job_name/builds/8691/build.xml
          java.lang.IllegalStateException
              at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:223)
              at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)
              at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
              at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
              at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
              at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
              at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
              at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
              at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
              at hudson.XmlFile.write(XmlFile.java:194)
              at hudson.model.Run.save(Run.java:1923)
              at hudson.plugins.disk_usage.DiskUsageUtil.calculationDiskUsageOfBuild(DiskUsageUtil.java:284)
              at hudson.plugins.disk_usage.DiskUsageBuildListener.onCompleted(DiskUsageBuildListener.java:21)
              at hudson.plugins.disk_usage.DiskUsageBuildListener.onCompleted(DiskUsageBuildListener.java:14)
              at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
              at hudson.model.Run.execute(Run.java:1772)
              at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
              at hudson.model.ResourceController.execute(ResourceController.java:97)
              at hudson.model.Executor.run(Executor.java:429

           

          Bitbucket (Server) Team Job

          Jan 11, 2018 3:46:50 AM hudson.XmlFile replaceIfNotAtTopLevel
          WARNING: JENKINS-45892: reference to jenkins.branch.OrganizationFolder@655fef3c[bitbucket_project_name] being saved from unexpected /var/lib/jenkins/jobs/bitbucket_project_name/computation/computation.xml
          java.lang.IllegalStateException
              at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:223)
              at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)
              at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
              at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
              at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
              at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
              at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
              at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
              at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
              at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
              at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
              at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
              at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
              at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
              at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
              at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
              at hudson.XmlFile.write(XmlFile.java:194)
              at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.save(FolderComputation.java:208)
              at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:192)
              at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:911)
              at hudson.model.ResourceController.execute(ResourceController.java:97)
              at hudson.model.Executor.run(Executor.java:429)

          Andrew Miller added a comment - - edited I'm still getting warnings about this on 2.101 for quite a few of our jobs. Mostly they're the same stacktrace, so I'll just post those. I'm not sure what is the issue. We had 59 instances of the warning today. I only have logs back to 2017/10/05, but I've found the first time that this warning appeared for us was on 2017/10/18 and only increased tenfold from 2017/11/08. The decrease in recent days is due to an unrelated issue where my Bitbucket account has been locked due to company password change regulations and unable to run jobs as we normally do.   I tried making a brand new instance of Jenkins with only the default plugins + blue ocean installed on my local machine and recreated the same Bitbucket project organization folder, but the warning still persists.   Number of warnings: $ for file in $(find . -name 'jenkins.log-*.gz' | sort); do echo $file; zcat $file | \grep 'WARNING: JENKINS-45892' | wc -l; done ./jenkins.log-20171005.gz 0 ./jenkins.log-20171006.gz 0 ./jenkins.log-20171007.gz 0 ./jenkins.log-20171008.gz 0 ./jenkins.log-20171009.gz 0 ./jenkins.log-20171010.gz 0 ./jenkins.log-20171011.gz 0 ./jenkins.log-20171012.gz 0 ./jenkins.log-20171013.gz 0 ./jenkins.log-20171014.gz 0 ./jenkins.log-20171015.gz 0 ./jenkins.log-20171016.gz 0 ./jenkins.log-20171017.gz 0 ./jenkins.log-20171018.gz 1 ./jenkins.log-20171019.gz 11 ./jenkins.log-20171020.gz 2 ./jenkins.log-20171021.gz 0 ./jenkins.log-20171022.gz 0 ./jenkins.log-20171023.gz 0 ./jenkins.log-20171024.gz 0 ./jenkins.log-20171025.gz 0 ./jenkins.log-20171026.gz 1 ./jenkins.log-20171027.gz 0 ./jenkins.log-20171028.gz 1 ./jenkins.log-20171029.gz 0 ./jenkins.log-20171030.gz 0 ./jenkins.log-20171031.gz 0 ./jenkins.log-20171101.gz 0 ./jenkins.log-20171102.gz 0 ./jenkins.log-20171103.gz 0 ./jenkins.log-20171104.gz 0 ./jenkins.log-20171105.gz 0 ./jenkins.log-20171106.gz 0 ./jenkins.log-20171107.gz 0 ./jenkins.log-20171108.gz 5613 ./jenkins.log-20171109.gz 10878 ./jenkins.log-20171110.gz 10649 ./jenkins.log-20171111.gz 10814 ./jenkins.log-20171112.gz 12205 ./jenkins.log-20171113.gz 11981 ./jenkins.log-20171114.gz 10961 ./jenkins.log-20171115.gz 10503 ./jenkins.log-20171116.gz 11223 ./jenkins.log-20171117.gz 11764 ./jenkins.log-20171118.gz 12450 ./jenkins.log-20171119.gz 13688 ./jenkins.log-20171120.gz 14382 ./jenkins.log-20171121.gz 12412 ./jenkins.log-20171122.gz 13281 ./jenkins.log-20171123.gz 11389 ./jenkins.log-20171124.gz 13503 ./jenkins.log-20171125.gz 12543 ./jenkins.log-20171126.gz 14083 ./jenkins.log-20171127.gz 14191 ./jenkins.log-20171128.gz 12533 ./jenkins.log-20171129.gz 12637 ./jenkins.log-20171130.gz 12611 ./jenkins.log-20171201.gz 12167 ./jenkins.log-20171202.gz 11967 ./jenkins.log-20171203.gz 14851 ./jenkins.log-20171204.gz 14351 ./jenkins.log-20171205.gz 12500 ./jenkins.log-20171206.gz 12302 ./jenkins.log-20171207.gz 13187 ./jenkins.log-20171208.gz 12828 ./jenkins.log-20171209.gz 13331 ./jenkins.log-20171210.gz 15298 ./jenkins.log-20171211.gz 15727 ./jenkins.log-20171212.gz 13240 ./jenkins.log-20171213.gz 13026 ./jenkins.log-20171214.gz 13550 ./jenkins.log-20171215.gz 13266 ./jenkins.log-20171216.gz 15347 ./jenkins.log-20171217.gz 18802 ./jenkins.log-20171218.gz 18977 ./jenkins.log-20171219.gz 17406 ./jenkins.log-20171220.gz 18594 ./jenkins.log-20171221.gz 17566 ./jenkins.log-20171222.gz 18294 ./jenkins.log-20171223.gz 19136 ./jenkins.log-20171224.gz 20323 ./jenkins.log-20171225.gz 20590 ./jenkins.log-20171226.gz 18471 ./jenkins.log-20171227.gz 18590 ./jenkins.log-20171228.gz 19305 ./jenkins.log-20171229.gz 19555 ./jenkins.log-20171230.gz 20559 ./jenkins.log-20171231.gz 22201 ./jenkins.log-20180101.gz 20821 ./jenkins.log-20180102.gz 21154 ./jenkins.log-20180103.gz 21422 ./jenkins.log-20180104.gz 21617 ./jenkins.log-20180105.gz 21129 ./jenkins.log-20180106.gz 21148 ./jenkins.log-20180107.gz 21134 ./jenkins.log-20180108.gz 21065 ./jenkins.log-20180109.gz 8906 ./jenkins.log-20180110.gz 1995 ./jenkins.log-20180111.gz 71   Freestyle Project Jan 11, 2018 2:33:41 PM hudson.XmlFile replaceIfNotAtTopLevel WARNING: JENKINS-45892: reference to hudson.model.FreeStyleProject@1fd2586f[freestyle_job_name] being saved from unexpected /var/lib/jenkins/jobs/freestyle_job_name/builds/8691/build.xml java.lang.IllegalStateException     at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:223)     at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)     at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)     at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)     at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)     at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)     at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)     at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)     at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)     at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)     at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)     at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)     at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)     at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)     at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)     at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)     at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)     at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)     at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)     at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)     at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)     at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)     at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)     at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)     at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)     at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)     at hudson.XmlFile.write(XmlFile.java:194)     at hudson.model.Run.save(Run.java:1923)     at hudson.plugins.disk_usage.DiskUsageUtil.calculationDiskUsageOfBuild(DiskUsageUtil.java:284)     at hudson.plugins.disk_usage.DiskUsageBuildListener.onCompleted(DiskUsageBuildListener.java:21)     at hudson.plugins.disk_usage.DiskUsageBuildListener.onCompleted(DiskUsageBuildListener.java:14)     at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)     at hudson.model.Run.execute(Run.java:1772)     at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)     at hudson.model.ResourceController.execute(ResourceController.java:97)     at hudson.model.Executor.run(Executor.java:429   Bitbucket (Server) Team Job Jan 11, 2018 3:46:50 AM hudson.XmlFile replaceIfNotAtTopLevel WARNING: JENKINS-45892: reference to jenkins.branch.OrganizationFolder@655fef3c[bitbucket_project_name] being saved from unexpected /var/lib/jenkins/jobs/bitbucket_project_name/computation/computation.xml java.lang.IllegalStateException     at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:223)     at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)     at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)     at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)     at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)     at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)     at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)     at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)     at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)     at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)     at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)     at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)     at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)     at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)     at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)     at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)     at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)     at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)     at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)     at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)     at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)     at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)     at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)     at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)     at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)     at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)     at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)     at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)     at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)     at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)     at hudson.XmlFile.write(XmlFile.java:194)     at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.save(FolderComputation.java:208)     at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:192)     at jenkins.branch.OrganizationFolder$OrganizationScan.run(OrganizationFolder.java:911)     at hudson.model.ResourceController.execute(ResourceController.java:97)     at hudson.model.Executor.run(Executor.java:429)

          Jesse Glick added a comment - - edited

          These are all probably distinct issues. For example, ikari7789’s two stack traces seem to point to

          • a bug in the Disk Usage plugin, perhaps
          • a bug somewhere in multibranch infrastructure, perhaps

          Some issues have already been solved in various plugins, so it is important to ensure all plugins are up to date. Best to file distinct JIRA issues linked to this one with complete steps to reproduce from scratch. The only way to solve these things generally is to reproduce it in a debugger. In some cases it is possible to guess at the problem by inspecting the XML file mentioned in the error.

          Jesse Glick added a comment - - edited These are all probably distinct issues. For example, ikari7789 ’s two stack traces seem to point to a bug in the Disk Usage plugin, perhaps a bug somewhere in multibranch infrastructure, perhaps Some issues have already been solved in various plugins, so it is important to ensure all plugins are up to date. Best to file distinct JIRA issues linked to this one with complete steps to reproduce from scratch. The only way to solve these things generally is to reproduce it in a debugger. In some cases it is possible to guess at the problem by inspecting the XML file mentioned in the error.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/maven/MavenProbeAction.java
          http://jenkins-ci.org/commit/maven-plugin/0c45df3b96a41e3c959f9191c33c3db257ade8e2
          Log:
          Eliminate JENKINS-45892 warning.
          MavenProbeAction was saving a copy of the project (or, as of 2.74, just a reference) in build.xml.
          This was silly because MavenProbeAction itself is transient—it is deleted when the build completes!

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/MavenProbeAction.java http://jenkins-ci.org/commit/maven-plugin/0c45df3b96a41e3c959f9191c33c3db257ade8e2 Log: Eliminate JENKINS-45892 warning. MavenProbeAction was saving a copy of the project (or, as of 2.74, just a reference) in build.xml. This was silly because MavenProbeAction itself is transient—it is deleted when the build completes!

          Emil Wypych added a comment - - edited

          I've just created a new issue - JENKINS-49368 - where I found the plugin causing this issue. It's the Last Changes Plugin. The issue is linked to this task.

          Emil Wypych added a comment - - edited I've just created a new issue - JENKINS-49368 - where I found the plugin causing this issue. It's the Last Changes Plugin. The issue is linked to this task.

          Ulli Hafner added a comment - - edited

          The exception message should be improved, currently (2.84.4) it is not possible to find the problematic action by looking at the stacktrace. One needs to look into build.xml to find it:

              <org.jenkinsci.plugins.pitmutation.PitBuildAction plugin="pitmutation@1.0-16">
                <owner__ class="flow-build" reference="../../.."/>
                <reports__/>
              </org.jenkinsci.plugins.pitmutation.PitBuildAction>
          
          
          WARNING: JENKINS-45892: reference to Model #2 being saved from unexpected /Users/hafner/Development/jenkins/jobs/Model/builds/4/build.xml
          java.lang.IllegalStateException
          	at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:210)
          	at hudson.model.Run.writeReplace(Run.java:1929)
          	at sun.reflect.GeneratedMethodAccessor286.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:498)
          	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
          	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
          	at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
          	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
          	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
          	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
          	at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
          	at hudson.XmlFile.write(XmlFile.java:181)
          	at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1070)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.copyLogs(WorkflowRun.java:544)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$600(WorkflowRun.java:143)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun$3.run(WorkflowRun.java:368)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
          	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
          	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          	at java.lang.Thread.run(Thread.java:748)
          
          Mar 10, 2018 2:47:57 PM hudson.XmlFile replaceIfNotAtTopLevel
          

          Ulli Hafner added a comment - - edited The exception message should be improved, currently (2.84.4) it is not possible to find the problematic action by looking at the stacktrace. One needs to look into build.xml to find it: <org.jenkinsci.plugins.pitmutation.PitBuildAction plugin="pitmutation@1.0-16"> <owner__ class="flow-build" reference="../../.."/> <reports__/> </org.jenkinsci.plugins.pitmutation.PitBuildAction> WARNING: JENKINS-45892: reference to Model #2 being saved from unexpected /Users/hafner/Development/jenkins/jobs/Model/builds/4/build.xml java.lang.IllegalStateException at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:210) at hudson.model.Run.writeReplace(Run.java:1929) at sun.reflect.GeneratedMethodAccessor286.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015) at com.thoughtworks.xstream.XStream.toXML(XStream.java:988) at hudson.XmlFile.write(XmlFile.java:181) at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30) at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1070) at org.jenkinsci.plugins.workflow.job.WorkflowRun.copyLogs(WorkflowRun.java:544) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$600(WorkflowRun.java:143) at org.jenkinsci.plugins.workflow.job.WorkflowRun$3.run(WorkflowRun.java:368) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Mar 10, 2018 2:47:57 PM hudson.XmlFile replaceIfNotAtTopLevel

          Hi guys, I'm trying to solve this issue on last changes plugin (JENKINS-49368) but I have no clues.  What should I look into build.xml?

          Below is a build.xml sample and here is the build action code and here is a model class used on the Build Action. If I got it right we shouldn't have 'LastChanges' as a property on LastChangesBuildAction. Any help is appreciated.

           

           

          <com.github.jenkins.lastchanges.LastChangesBuildAction plugin="last-changes@2.7-SNAPSHOT">
                <build class="build" reference="../../.."/>
                <buildChanges>
                  <currentRevision>
                    <commitId>08381f99f1847c56e5e469090c6adb8600f4d66e</commitId>
                    <commitMessage>update docker container
          </commitMessage>
                    <committerName>rmpestano</committerName>
                    <committerEmail>rmpestano@gmail.com</committerEmail>
                    <commitDate>11/03/2018 00:22:05 GMT-03:00</commitDate>
                  </currentRevision>
                  <previousRevision>
                    <commitId>dd255d59a85377ea2651c4570072277cd6dd069a</commitId>
                    <commitMessage>[maven-release-plugin] prepare for next development iteration
          </commitMessage>
                    <committerName>rmpestano</committerName>
                    <committerEmail>rmpestano@gmail.com</committerEmail>
                    <commitDate>10/03/2018 23:21:04 GMT-03:00</commitDate>
                  </previousRevision>
                  <diff>diff --git a/docker/Dockerfile b/docker/Dockerfile
          index e5ce847..9fe9f66 100644
          --- a/docker/Dockerfile
          +++ b/docker/Dockerfile
          @@ -1,4 +1,4 @@
          -FROM jenkins:2.73.1
          -COPY plugins.txt /usr/share/jenkins/plugins.txt
          +FROM jenkins/jenkins:2.73.1
           ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot;
          -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
          \ No newline at end of file
          +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
          +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt
          \ No newline at end of file
          diff --git a/docker/plugins.txt b/docker/plugins.txt
          index ddd6975..4452c81 100644
          --- a/docker/plugins.txt
          +++ b/docker/plugins.txt
          @@ -47,4 +47,3 @@
           workflow-step-api:2.10
           workflow-support:2.14
           cucumber-living-documentation:2.1
          -
          </diff>
                  <commits>
                    <com.github.jenkins.lastchanges.model.CommitChanges>
                      <commitInfo reference="../../../currentRevision"/>
                      <changes>diff --git a/docker/Dockerfile b/docker/Dockerfile
          index e5ce847..9fe9f66 100644
          --- a/docker/Dockerfile
          +++ b/docker/Dockerfile
          @@ -1,4 +1,4 @@
          -FROM jenkins:2.73.1
          -COPY plugins.txt /usr/share/jenkins/plugins.txt
          +FROM jenkins/jenkins:2.73.1
           ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot;
          -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
          \ No newline at end of file
          +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
          +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt
          \ No newline at end of file
          diff --git a/docker/plugins.txt b/docker/plugins.txt
          index ddd6975..4452c81 100644
          --- a/docker/plugins.txt
          +++ b/docker/plugins.txt
          @@ -47,4 +47,3 @@
           workflow-step-api:2.10
           workflow-support:2.14
           cucumber-living-documentation:2.1
          -
          </changes>
                    </com.github.jenkins.lastchanges.model.CommitChanges>
                  </commits>
                </buildChanges>
                <config>
                  <format>LINE</format>
                  <matching>NONE</matching>
                  <matchWordsThreshold>0.25</matchWordsThreshold>
                  <matchingMaxComparisons>1000.0</matchingMaxComparisons>
                  <showFiles>true</showFiles>
                  <synchronisedScroll>true</synchronisedScroll>
                  <since>PREVIOUS_REVISION</since>
                  <specificRevision></specificRevision>
                </config>
                <projectActions>
                  <com.github.jenkins.lastchanges.LastChangesProjectAction>
                    <job class="hudson.model.FreeStyleProject" resolves-to="hudson.model.AbstractItem$Replacer">
                      <fullName>test2</fullName>
                    </job>
                  </com.github.jenkins.lastchanges.LastChangesProjectAction>
                </projectActions>
              </com.github.jenkins.lastchanges.LastChangesBuildAction>

           

           

           

          Rafael Pestano added a comment - Hi guys, I'm trying to solve this issue on last changes plugin ( JENKINS-49368 ) but I have no clues.  What should I look into build.xml? Below is a build.xml sample and here is the build action code and here is a model class used on the Build Action. If I got it right we shouldn't have 'LastChanges' as a property on LastChangesBuildAction. Any help is appreciated.     <com.github.jenkins.lastchanges.LastChangesBuildAction plugin="last-changes@2.7-SNAPSHOT"> <build class="build" reference="../../.."/> <buildChanges> <currentRevision> <commitId>08381f99f1847c56e5e469090c6adb8600f4d66e</commitId> <commitMessage>update docker container </commitMessage> <committerName>rmpestano</committerName> <committerEmail>rmpestano@gmail.com</committerEmail> <commitDate>11/03/2018 00:22:05 GMT-03:00</commitDate> </currentRevision> <previousRevision> <commitId>dd255d59a85377ea2651c4570072277cd6dd069a</commitId> <commitMessage>[maven-release-plugin] prepare for next development iteration </commitMessage> <committerName>rmpestano</committerName> <committerEmail>rmpestano@gmail.com</committerEmail> <commitDate>10/03/2018 23:21:04 GMT-03:00</commitDate> </previousRevision> <diff>diff --git a/docker/Dockerfile b/docker/Dockerfile index e5ce847..9fe9f66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins:2.73.1 -COPY plugins.txt /usr/share/jenkins/plugins.txt +FROM jenkins/jenkins:2.73.1 ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot; -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt \ No newline at end of file +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt \ No newline at end of file diff --git a/docker/plugins.txt b/docker/plugins.txt index ddd6975..4452c81 100644 --- a/docker/plugins.txt +++ b/docker/plugins.txt @@ -47,4 +47,3 @@ workflow-step-api:2.10 workflow-support:2.14 cucumber-living-documentation:2.1 - </diff> <commits> <com.github.jenkins.lastchanges.model.CommitChanges> <commitInfo reference="../../../currentRevision"/> <changes>diff --git a/docker/Dockerfile b/docker/Dockerfile index e5ce847..9fe9f66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins:2.73.1 -COPY plugins.txt /usr/share/jenkins/plugins.txt +FROM jenkins/jenkins:2.73.1 ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot; -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt \ No newline at end of file +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt \ No newline at end of file diff --git a/docker/plugins.txt b/docker/plugins.txt index ddd6975..4452c81 100644 --- a/docker/plugins.txt +++ b/docker/plugins.txt @@ -47,4 +47,3 @@ workflow-step-api:2.10 workflow-support:2.14 cucumber-living-documentation:2.1 - </changes> </com.github.jenkins.lastchanges.model.CommitChanges> </commits> </buildChanges> <config> <format>LINE</format> <matching>NONE</matching> <matchWordsThreshold>0.25</matchWordsThreshold> <matchingMaxComparisons>1000.0</matchingMaxComparisons> <showFiles>true</showFiles> <synchronisedScroll>true</synchronisedScroll> <since>PREVIOUS_REVISION</since> <specificRevision></specificRevision> </config> <projectActions> <com.github.jenkins.lastchanges.LastChangesProjectAction> <job class="hudson.model.FreeStyleProject" resolves-to="hudson.model.AbstractItem$Replacer"> <fullName>test2</fullName> </job> </com.github.jenkins.lastchanges.LastChangesProjectAction> </projectActions> </com.github.jenkins.lastchanges.LastChangesBuildAction>      

          Ulli Hafner added a comment - - edited

          You need to make the field build transient and fill it right after Jenkins loaded the build. Example: ResultAction

          Ulli Hafner added a comment - - edited You need to make the field build transient and fill it right after Jenkins loaded the build. Example: ResultAction

          Code changed in jenkins
          User: rmpestano
          Path:
          pom.xml
          src/main/java/com/github/jenkins/lastchanges/LastChangesBuildAction.java
          http://jenkins-ci.org/commit/last-changes-plugin/ebe11aeea5e07641f89fbb0de8ce5796a17e700a
          Log:
          refs JENKINS-45892

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: rmpestano Path: pom.xml src/main/java/com/github/jenkins/lastchanges/LastChangesBuildAction.java http://jenkins-ci.org/commit/last-changes-plugin/ebe11aeea5e07641f89fbb0de8ce5796a17e700a Log: refs JENKINS-45892

          Hi drulli, thanks for your reply. I'm still facing the same issue, any other advice?

          Here is build.xml:

          <com.github.jenkins.lastchanges.LastChangesBuildAction plugin="last-changes@2.7-SNAPSHOT">
                <buildChanges>
                  <currentRevision>
                    <commitId>08381f99f1847c56e5e469090c6adb8600f4d66e</commitId>
                    <commitMessage>update docker container
          </commitMessage>
                    <committerName>rmpestano</committerName>
                    <committerEmail>rmpestano@gmail.com</committerEmail>
                    <commitDate>11/03/2018 00:22:05 GMT-03:00</commitDate>
                  </currentRevision>
                  <previousRevision>
                    <commitId>dd255d59a85377ea2651c4570072277cd6dd069a</commitId>
                    <commitMessage>[maven-release-plugin] prepare for next development iteration
          </commitMessage>
                    <committerName>rmpestano</committerName>
                    <committerEmail>rmpestano@gmail.com</committerEmail>
                    <commitDate>10/03/2018 23:21:04 GMT-03:00</commitDate>
                  </previousRevision>
                  <diff>diff --git a/docker/Dockerfile b/docker/Dockerfile
          index e5ce847..9fe9f66 100644
          --- a/docker/Dockerfile
          +++ b/docker/Dockerfile
          @@ -1,4 +1,4 @@
          -FROM jenkins:2.73.1
          -COPY plugins.txt /usr/share/jenkins/plugins.txt
          +FROM jenkins/jenkins:2.73.1
           ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot;
          -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
          \ No newline at end of file
          +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
          +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt
          \ No newline at end of file
          diff --git a/docker/plugins.txt b/docker/plugins.txt
          index ddd6975..4452c81 100644
          --- a/docker/plugins.txt
          +++ b/docker/plugins.txt
          @@ -47,4 +47,3 @@
           workflow-step-api:2.10
           workflow-support:2.14
           cucumber-living-documentation:2.1
          -
          </diff>
                  <commits>
                    <com.github.jenkins.lastchanges.model.CommitChanges>
                      <commitInfo reference="../../../currentRevision"/>
                      <changes>diff --git a/docker/Dockerfile b/docker/Dockerfile
          index e5ce847..9fe9f66 100644
          --- a/docker/Dockerfile
          +++ b/docker/Dockerfile
          @@ -1,4 +1,4 @@
          -FROM jenkins:2.73.1
          -COPY plugins.txt /usr/share/jenkins/plugins.txt
          +FROM jenkins/jenkins:2.73.1
           ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot;
          -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
          \ No newline at end of file
          +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
          +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt
          \ No newline at end of file
          diff --git a/docker/plugins.txt b/docker/plugins.txt
          index ddd6975..4452c81 100644
          --- a/docker/plugins.txt
          +++ b/docker/plugins.txt
          @@ -47,4 +47,3 @@
           workflow-step-api:2.10
           workflow-support:2.14
           cucumber-living-documentation:2.1
          -
          </changes>
                    </com.github.jenkins.lastchanges.model.CommitChanges>
                  </commits>
                </buildChanges>
                <config>
                  <format>LINE</format>
                  <matching>NONE</matching>
                  <matchWordsThreshold>0.25</matchWordsThreshold>
                  <matchingMaxComparisons>1000.0</matchingMaxComparisons>
                  <showFiles>true</showFiles>
                  <synchronisedScroll>true</synchronisedScroll>
                  <since>PREVIOUS_REVISION</since>
                  <specificRevision></specificRevision>
                </config>
                <projectActions>
                  <com.github.jenkins.lastchanges.LastChangesProjectAction>
                    <job class="hudson.model.FreeStyleProject" resolves-to="hudson.model.AbstractItem$Replacer">
                      <fullName>test3</fullName>
                    </job>
                  </com.github.jenkins.lastchanges.LastChangesProjectAction>
                </projectActions>
              </com.github.jenkins.lastchanges.LastChangesBuildAction>
          

          Rafael Pestano added a comment - Hi drulli , thanks for your reply. I'm still facing the same issue, any other advice? Here is build.xml: <com.github.jenkins.lastchanges.LastChangesBuildAction plugin="last-changes@2.7-SNAPSHOT"> <buildChanges> <currentRevision> <commitId>08381f99f1847c56e5e469090c6adb8600f4d66e</commitId> <commitMessage>update docker container </commitMessage> <committerName>rmpestano</committerName> <committerEmail>rmpestano@gmail.com</committerEmail> <commitDate>11/03/2018 00:22:05 GMT-03:00</commitDate> </currentRevision> <previousRevision> <commitId>dd255d59a85377ea2651c4570072277cd6dd069a</commitId> <commitMessage>[maven-release-plugin] prepare for next development iteration </commitMessage> <committerName>rmpestano</committerName> <committerEmail>rmpestano@gmail.com</committerEmail> <commitDate>10/03/2018 23:21:04 GMT-03:00</commitDate> </previousRevision> <diff>diff --git a/docker/Dockerfile b/docker/Dockerfile index e5ce847..9fe9f66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins:2.73.1 -COPY plugins.txt /usr/share/jenkins/plugins.txt +FROM jenkins/jenkins:2.73.1 ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot; -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt \ No newline at end of file +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt \ No newline at end of file diff --git a/docker/plugins.txt b/docker/plugins.txt index ddd6975..4452c81 100644 --- a/docker/plugins.txt +++ b/docker/plugins.txt @@ -47,4 +47,3 @@ workflow-step-api:2.10 workflow-support:2.14 cucumber-living-documentation:2.1 - </diff> <commits> <com.github.jenkins.lastchanges.model.CommitChanges> <commitInfo reference="../../../currentRevision"/> <changes>diff --git a/docker/Dockerfile b/docker/Dockerfile index e5ce847..9fe9f66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins:2.73.1 -COPY plugins.txt /usr/share/jenkins/plugins.txt +FROM jenkins/jenkins:2.73.1 ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot; -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt \ No newline at end of file +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt \ No newline at end of file diff --git a/docker/plugins.txt b/docker/plugins.txt index ddd6975..4452c81 100644 --- a/docker/plugins.txt +++ b/docker/plugins.txt @@ -47,4 +47,3 @@ workflow-step-api:2.10 workflow-support:2.14 cucumber-living-documentation:2.1 - </changes> </com.github.jenkins.lastchanges.model.CommitChanges> </commits> </buildChanges> <config> <format>LINE</format> <matching>NONE</matching> <matchWordsThreshold>0.25</matchWordsThreshold> <matchingMaxComparisons>1000.0</matchingMaxComparisons> <showFiles>true</showFiles> <synchronisedScroll>true</synchronisedScroll> <since>PREVIOUS_REVISION</since> <specificRevision></specificRevision> </config> <projectActions> <com.github.jenkins.lastchanges.LastChangesProjectAction> <job class="hudson.model.FreeStyleProject" resolves-to="hudson.model.AbstractItem$Replacer"> <fullName>test3</fullName> </job> </com.github.jenkins.lastchanges.LastChangesProjectAction> </projectActions> </com.github.jenkins.lastchanges.LastChangesBuildAction>

          Oleg Nenashev added a comment -

          rmpestano responded in JENKINS-49368

          Oleg Nenashev added a comment - rmpestano responded in JENKINS-49368

          Code changed in jenkins
          User: rmpestano
          Path:
          src/main/java/com/github/jenkins/lastchanges/LastChangesProjectAction.java
          http://jenkins-ci.org/commit/last-changes-plugin/0cb6083a31b207099c5400e4f4a93bee8510f3a5
          Log:
          refs JENKINS-45892

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: rmpestano Path: src/main/java/com/github/jenkins/lastchanges/LastChangesProjectAction.java http://jenkins-ci.org/commit/last-changes-plugin/0cb6083a31b207099c5400e4f4a93bee8510f3a5 Log: refs JENKINS-45892

          Code changed in jenkins
          User: Yeh Fang
          Path:
          src/main/java/hudson/plugins/sauce_ondemand/BrowserAxis.java
          src/main/java/hudson/plugins/sauce_ondemand/SauceOnDemandProjectAction.java
          http://jenkins-ci.org/commit/sauce-ondemand-plugin/970a4049c927cd22618a2d0d82ff20d13dc25043
          Log:
          fix for JENKINS-45892

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Yeh Fang Path: src/main/java/hudson/plugins/sauce_ondemand/BrowserAxis.java src/main/java/hudson/plugins/sauce_ondemand/SauceOnDemandProjectAction.java http://jenkins-ci.org/commit/sauce-ondemand-plugin/970a4049c927cd22618a2d0d82ff20d13dc25043 Log: fix for JENKINS-45892

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: