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

ContentMappings fails to load with ParseError

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • support-core-plugin
    • None

      Mapping of original names can cause the ContentMappings to fail loading.

      For example:

          <com.cloudbees.jenkins.support.filter.ContentMapping resolves-to="com.cloudbees.jenkins.support.filter.ContentMapping$SerializationProxy">
            <original>&#x0;test</original>
            <replacement>user_good_wheat</replacement>
          </com.cloudbees.jenkins.support.filter.ContentMapping>
      

      Would cause a failure to load on startup:

      WARNING	h.ExtensionFinder$GuiceFinder#instantiate: Failed to load com.cloudbees.jenkins.support.filter.ContentMappings
      javax.xml.stream.XMLStreamException: ParseError at [row,col]:[148,26]
      Message: The entity name must immediately follow the '&' in the entity reference.
      	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:652)
      	at com.thoughtworks.xstream.io.xml.StaxReader.pullNextEvent(StaxReader.java:58)
      Caused: com.thoughtworks.xstream.io.StreamException:
      	at com.thoughtworks.xstream.io.xml.StaxReader.pullNextEvent(StaxReader.java:74)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:135)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
      	at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveUp(AbstractPullReader.java:113)
      	at com.thoughtworks.xstream.io.ReaderWrapper.moveUp(ReaderWrapper.java:40)
      	at com.thoughtworks.xstream.io.path.PathTrackingReader.moveUp(PathTrackingReader.java:42)
      	at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:391)
      	at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:289)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74)
      Caused: com.thoughtworks.xstream.converters.ConversionException:
      ---- Debugging information ----
      cause-exception     : com.thoughtworks.xstream.io.StreamException
      cause-message       :
      class               : com.cloudbees.jenkins.support.filter.ContentMappings$XmlProxy
      required-type       : com.cloudbees.jenkins.support.filter.ContentMappings$XmlProxy
      converter-type      : hudson.util.RobustReflectionConverter
      path                : /com.cloudbees.jenkins.support.filter.ContentMappings/mappings/com.cloudbees.jenkins.support.filter.ContentMapping/original
      line number         : 148
      version             : not available
      -------------------------------
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:81)
      	at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52)
      	at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:136)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1464)
      	at hudson.util.XStream2.unmarshal(XStream2.java:230)
      	at hudson.util.XStream2.unmarshal(XStream2.java:201)
      	at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1441)
      	at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1330)
      	at hudson.XmlFile.read(XmlFile.java:165)
      Caused: java.io.IOException: Unable to read /tmp/je-1-home/com.cloudbees.jenkins.support.filter.ContentMappings.xml
      	at hudson.XmlFile.read(XmlFile.java:167)
      	at com.cloudbees.jenkins.support.util.Persistence.load(Persistence.java:72)
      	at com.cloudbees.jenkins.support.filter.ContentMappings.newInstance(ContentMappings.java:94)
      

            allan_burdajewicz Allan BURDAJEWICZ
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: