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

BlueOceanUrlObjectImpl has a non-transient reference to a ModelObject

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • blueocean-plugin
    • None
    • Blue Ocean 1.4 - beta 3

      With recent cores, such references make serialization of build objects fail, see https://issues.jenkins-ci.org/browse/JENKINS-45892 for background.

      Nov 29, 2017 6:58:52 PM hudson.XmlFile replaceIfNotAtTopLevel
      WARNING: JENKINS-45892: reference to org.jenkinsci.plugins.workflow.job.WorkflowJob@488f6bf6[myjob/mybranch] being saved from unexpected /var/jenkins_home/jobs/myjob/branches/mybranch.njvm0k/builds/7/build.xml
      java.lang.IllegalStateException
              at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:210)
              at hudson.model.AbstractItem.writeReplace(AbstractItem.java:509)
              at sun.reflect.GeneratedMethodAccessor243.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 hudson.model.Run.save(Run.java:1920)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.copyLogs(WorkflowRun.java:527)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$600(WorkflowRun.java:135)
              at org.jenkinsci.plugins.workflow.job.WorkflowRun$3.run(WorkflowRun.java:350)
              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:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

          [JENKINS-48322] BlueOceanUrlObjectImpl has a non-transient reference to a ModelObject

          Marc Salles Navarro added a comment - - edited

          Similar situation here, just for different files. Here's some example stack traces:

           

          Dec 19, 2017 4:05:01 PM WARNING hudson.XmlFile replaceIfNotAtTopLevel
          JENKINS-45892: reference to org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@3d93e4ac[some-project] being saved from unexpected /var/lib/jenkins/jobs/some-project/indexing/indexing.xml
          java.lang.IllegalStateException
          	at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:208)
          	at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)
          	at sun.reflect.GeneratedMethodAccessor110.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:179)
          	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:429)

           

           

          Dec 19, 2017 4:07:01 PM WARNING hudson.XmlFile replaceIfNotAtTopLevel
          JENKINS-45892: reference to jenkins.branch.OrganizationFolder@16953464[some-project] being saved from unexpected /var/lib/jenkins/jobs/some-project/computation/computation.xml
          java.lang.IllegalStateException
          	at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:208)
          	at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492)
          	at sun.reflect.GeneratedMethodAccessor110.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:179)
          	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)

           

          These XML files contain a BlueOceanUrlAction element which contain as task the problematic classes (WorkflowMultiBranchProject and OrganizationFolder) .

           

              <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction plugin="blueocean-rest-impl@1.3.5">
          
                <blueOceanUrlObject class="io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectImpl">
          
                  <mappedUrl>whatever/organizations/jenkins/pipelines/</mappedUrl>
          
                  <modelObject class="hudson.model.Queue$WaitingItem">
          
                    <actions>
          
                      <hudson.model.CauseAction reference="../../../../../hudson.model.CauseAction"/>
          
                      <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction reference="../../../.."/>
          
                    </actions>
          
                    <id>1720172</id>
          
                    <task class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" resolves-to="hudson.model.AbstractItem$Replacer" plugin="workflow-multibranch@2.16">
          
                      <fullName>my_other_name</fullName>
          
                    </task>
          
                    <inQueueSince>1513698660912</inQueueSince>
          
                    <timestamp>
          
                      <time>1513698660912</time>
          
                      <timezone>Europe/Berlin</timezone>
          
                    </timestamp>
          
                  </modelObject>
          
                </blueOceanUrlObject>
          
              </io.jenkins.blueocean.service.embedded.BlueOceanUrlAction>
          
              <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction reference="../io.jenkins.blueocean.service.embedded.BlueOceanUrlAction"/>

           

           

           

              <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction plugin="blueocean-rest-impl@1.3.5">
          
                <blueOceanUrlObject class="io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectImpl">
          
                  <mappedUrl>whatever/organizations/jenkins/pipelines/</mappedUrl>
          
                  <modelObject class="hudson.model.Queue$WaitingItem">
          
                    <actions>
          
                      <hudson.model.CauseAction reference="../../../../../hudson.model.CauseAction"/>
          
                      <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction reference="../../../.."/>
          
                    </actions>
          
                    <id>1719629</id>
          
                    <task class="jenkins.branch.OrganizationFolder" resolves-to="hudson.model.AbstractItem$Replacer" plugin="branch-api@2.0.16">
          
                      <fullName>my_name</fullName>
          
                    </task>
          
                    <inQueueSince>1513696560912</inQueueSince>
          
                    <timestamp>
          
                      <time>1513696560912</time>
          
                      <timezone>Europe/Berlin</timezone>
          
                    </timestamp>
          
                  </modelObject>
          
                </blueOceanUrlObject>
          
              </io.jenkins.blueocean.service.embedded.BlueOceanUrlAction>
          
              <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction reference="../io.jenkins.blueocean.service.embedded.BlueOceanUrlAction"/>

           

           

          Marc Salles Navarro added a comment - - edited Similar situation here, just for different files. Here's some example stack traces:   Dec 19, 2017 4:05:01 PM WARNING hudson.XmlFile replaceIfNotAtTopLevel JENKINS-45892: reference to org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@3d93e4ac[some-project] being saved from unexpected /var/lib/jenkins/jobs/some-project/indexing/indexing.xml java.lang.IllegalStateException at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:208) at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492) at sun.reflect.GeneratedMethodAccessor110.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:179) 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:429)     Dec 19, 2017 4:07:01 PM WARNING hudson.XmlFile replaceIfNotAtTopLevel JENKINS-45892: reference to jenkins.branch.OrganizationFolder@16953464[some-project] being saved from unexpected /var/lib/jenkins/jobs/some-project/computation/computation.xml java.lang.IllegalStateException at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:208) at hudson.model.AbstractItem.writeReplace(AbstractItem.java:492) at sun.reflect.GeneratedMethodAccessor110.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:179) 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)   These XML files contain a BlueOceanUrlAction element which contain as task the problematic classes (WorkflowMultiBranchProject and OrganizationFolder) .       <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction plugin="blueocean-rest-impl@1.3.5">       <blueOceanUrlObject class="io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectImpl">         <mappedUrl>whatever/organizations/jenkins/pipelines/</mappedUrl>         <modelObject class="hudson.model.Queue$WaitingItem">           <actions>             <hudson.model.CauseAction reference="../../../../../hudson.model.CauseAction"/>             <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction reference="../../../.."/>           </actions>           <id>1720172</id>           <task class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" resolves-to="hudson.model.AbstractItem$Replacer" plugin="workflow-multibranch@2.16">             <fullName>my_other_name</fullName>           </task>           <inQueueSince>1513698660912</inQueueSince>           <timestamp>             <time>1513698660912</time>             <timezone>Europe/Berlin</timezone>           </timestamp>         </modelObject>       </blueOceanUrlObject>     </io.jenkins.blueocean.service.embedded.BlueOceanUrlAction>     <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction reference="../io.jenkins.blueocean.service.embedded.BlueOceanUrlAction"/>           <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction plugin="blueocean-rest-impl@1.3.5">       <blueOceanUrlObject class="io.jenkins.blueocean.service.embedded.BlueOceanUrlObjectImpl">         <mappedUrl>whatever/organizations/jenkins/pipelines/</mappedUrl>         <modelObject class="hudson.model.Queue$WaitingItem">           <actions>             <hudson.model.CauseAction reference="../../../../../hudson.model.CauseAction"/>             <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction reference="../../../.."/>           </actions>           <id>1719629</id>           <task class="jenkins.branch.OrganizationFolder" resolves-to="hudson.model.AbstractItem$Replacer" plugin="branch-api@2.0.16">             <fullName>my_name</fullName>           </task>           <inQueueSince>1513696560912</inQueueSince>           <timestamp>             <time>1513696560912</time>             <timezone>Europe/Berlin</timezone>           </timestamp>         </modelObject>       </blueOceanUrlObject>     </io.jenkins.blueocean.service.embedded.BlueOceanUrlAction> <io.jenkins.blueocean.service.embedded.BlueOceanUrlAction reference="../io.jenkins.blueocean.service.embedded.BlueOceanUrlAction"/>    

          Roman Pickl added a comment -

          Same here with log files getting very big.

          Roman Pickl added a comment - Same here with log files getting very big.

          James Dumay added a comment -

          vivek I remember we fixed something like this last year on master. Could you please confirm?

          James Dumay added a comment - vivek I remember we fixed something like this last year on master. Could you please confirm?

          James Dumay added a comment -

          svanoort abayer did I remember correctly that we fixed something like this recently?

          James Dumay added a comment - svanoort abayer did I remember correctly that we fixed something like this recently?

          Vivek Pandey added a comment -

          jamesdumay This is different, more to do with BlueOceanUrlObjectImpl unintentionally keeping a non-transient reference to ModelObject as the ticket points to. I will open a PR.

          Vivek Pandey added a comment - jamesdumay This is different, more to do with BlueOceanUrlObjectImpl unintentionally keeping a non-transient reference to ModelObject as the ticket points to. I will open a PR.

          Vivek Pandey added a comment -

          Vivek Pandey added a comment - Opened PR, https://github.com/jenkinsci/blueocean-plugin/pull/1606 .

          Jesse Glick added a comment -

          The fix may be wrong, as I noted in the PR.

          Jesse Glick added a comment - The fix may be wrong, as I noted in the PR.

          Vivek Pandey added a comment -

          Fix was not complete, another PR coming.

          Vivek Pandey added a comment - Fix was not complete, another PR coming.

          Vivek Pandey added a comment -

          Vivek Pandey added a comment - New PR https://github.com/jenkinsci/blueocean-plugin/pull/1609 .

          Gavin McDonald added a comment - - edited

          See also: https://issues.apache.org/jira/browse/INFRA-15730 - our issue was cured after upgrade to latest.

           

          So, thanks!

          Gavin McDonald added a comment - - edited See also: https://issues.apache.org/jira/browse/INFRA-15730 - our issue was cured after upgrade to latest.   So, thanks!

            vivek Vivek Pandey
            vlatombe Vincent Latombe
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: