XStream ConversionException

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 5.12.3.1
    • Affects Version/s: 5.10.1.1
    • Component/s: None

      Summary

      Certain build with jobs that always hang consistently despite being finished on the agent. That is, the agent finishes the job and moves on to another one. The logs are fully streamed to the server but the job remains 'blue' instead of turning green, red or grey.

      Environment

      • Bamboo v5.10.1.1

        Actual Results

      These hangs coincide with the following stack trace on the Bamboo server <bamboo-install>/logs/catalina.out:

      2016-08-04 11:07:06,332 ERROR [9-BuildTailMessageProcessingThread-expensive:pool-16-thread-1] [SystemAuthorityThreadFactory] Uncaught exception in thread 9-BuildTailMessageProcessingThread-expensive:pool-16-thread-1
      java.lang.reflect.UndeclaredThrowableException
              at com.sun.proxy.$Proxy108.fromMessage(Unknown Source)
              at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener.decode(BambooAgentMessageListener.java:94)
              at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener.access$200(BambooAgentMessageListener.java:18)
              at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener$1.run(BambooAgentMessageListener.java:52)
              at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
              at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
              at com.atlassian.bamboo.v2.build.agent.BambooAgentMessageListener.onMessage(BambooAgentMessageListener.java:43)
              at com.atlassian.bamboo.v2.build.agent.ParallelizingMessageListener$1.run(ParallelizingMessageListener.java:85)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
              at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
              at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
              at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.reflect.InvocationTargetException
              at sun.reflect.GeneratedMethodAccessor1655.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at com.atlassian.bamboo.spring.LazyComponentProxyFactoryBean$LazyInvocationHandler.invoke(LazyComponentProxyFactoryBean.java:59)
              ... 15 more
      Caused by: com.thoughtworks.xstream.converters.ConversionException: com.thoughtworks.xstream.mapper.Mapper$Null : com.thoughtworks.xstream.mapper.Mapper$Null
      ---- Debugging information ----
      message             : com.thoughtworks.xstream.mapper.Mapper$Null
      cause-exception     : com.thoughtworks.xstream.security.ForbiddenClassException
      cause-message       : com.thoughtworks.xstream.mapper.Mapper$Null
      class               : com.atlassian.bamboo.collections.message.FinalHashMap
      required-type       : com.atlassian.bamboo.collections.message.FinalHashMap
      converter-type      : com.atlassian.bamboo.serialization.xstream.FinalHashMapConverter
      path                : /com.atlassian.bamboo.v2.build.agent.messages.BatchRemoteBambooMessage/messages/com.atlassian.bamboo.v2.build.agent.messages.ProcessResult/context/runtimeTaskDefinitions/com.atlassian.bamboo.task.runtime.RuntimeTaskDe
      finitionImpl/runtimeContext/entry[5]/null
      line number         : 53
      class[1]            : com.atlassian.bamboo.task.runtime.RuntimeTaskDefinitionImpl
      converter-type[1]   : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
      class[2]            : com.atlassian.bamboo.collections.message.FinalArrayList
      converter-type[2]   : com.atlassian.bamboo.serialization.xstream.FinalCollectionConverter
      class[3]            : com.atlassian.bamboo.v2.build.BuildContextImpl
      converter-type[3]   : com.atlassian.bamboo.serialization.xstream.BuildContextXStreamConverter
      class[4]            : com.atlassian.bamboo.v2.build.agent.messages.ProcessResult
      class[5]            : com.atlassian.bamboo.collections.message.FinalLinkedList
      class[6]            : com.atlassian.bamboo.v2.build.agent.messages.BatchRemoteBambooMessage
      version             : not available
      -------------------------------
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
              at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
              at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
              at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
              at com.atlassian.bamboo.serialization.xstream.AbstractXStreamConverterAdapter.unmarshal(AbstractXStreamConverterAdapter.java:40)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
              at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
              at com.atlassian.bamboo.serialization.xstream.BuildContextXStreamConverter.unmarshal(BuildContextXStreamConverter.java:111)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
              at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
              at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
              at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:98)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:91)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:85)
              at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:80)
              at com.atlassian.bamboo.serialization.xstream.AbstractXStreamConverterAdapter.unmarshal(AbstractXStreamConverterAdapter.java:40)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
              at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:480)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:412)
              at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:263)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
              at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
              at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
              at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1206)
              at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
              at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1190)
              at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1061)
              at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1052)
              at com.atlassian.bamboo.v2.build.queue.BambooMessageConverter.fromMessage(BambooMessageConverter.java:93)
              ... 19 more
      Caused by: com.thoughtworks.xstream.security.ForbiddenClassException: com.thoughtworks.xstream.mapper.Mapper$Null
              at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26)
              at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:74)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
              at com.atlassian.bamboo.serialization.xstream.PluginsAwareMapper.realClass(PluginsAwareMapper.java:105)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
              at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
              at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29)
              at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:70)
              at com.thoughtworks.xstream.converters.collections.MapConverter.putCurrentEntryIntoMap(MapConverter.java:110)
              at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:98)
              at com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:92)
              at com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:87)
              at com.atlassian.bamboo.serialization.xstream.AbstractXStreamConverterAdapter.unmarshal(AbstractXStreamConverterAdapter.java:40)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
              ... 74 more
      
      

      There are no errors on the agent side.

      Workaround

      • edit file <bamboo-home>/xml-data/configuration/serialization-whitelist.list
      • append line
        com.thoughtworks.xstream.mapper.Mapper$Null
        

        (allow serialization & deserialization of NULLs)

      • restart Bamboo

            Assignee:
            Przemek Bruski
            Reporter:
            Rafael Sperafico (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: