• Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 6.7.1
    • Jenkins importer
    • None

      Problem

      Since Jenkins 2.107 the config files used by Jenkins are written using XML version 1.1
      Jenkins Upgrade Guide

      When trying to import from Jenkins 2.107 or later the import will fail.

      The following appears in the atlassian-bamboo.log

      2018-10-31 16:56:16,102 INFO [http-nio-8085-exec-2] [SelectJobsForImport] Reading Jenkins data from /JENKINS_LOCATION
      2018-10-31 16:56:16,171 ERROR [http-nio-8085-exec-2] [Jenkins] Exception loading Jenkins configuration
      java.io.IOException: Unable to read /JENKINS_LOCATION/config.xml
              at hudson.XmlFile.unmarshal(XmlFile.java:162)
              at jenkins.model.Jenkins.loadConfiguration(Jenkins.java:587)
              at jenkins.model.Jenkins.setRootDir(Jenkins.java:497)
              at com.atlassian.bamboo.jenkins.importer.core.JenkinsDataReader.initializeDataDirectories(JenkinsDataReader.java:197)
      ...
              at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:65)
              at hudson.XmlFile.unmarshal(XmlFile.java:160)
              ... 294 more
      Caused by: org.xmlpull.v1.XmlPullParserException: only 1.0 is supported as <?xml version not '1.1' (position: START_DOCUMENT seen <?xml version=\'1.1\'... @1:19)
              at org.xmlpull.mxp1.MXParser.parseXmlDeclWithVersion(MXParser.java:2608)
              at org.xmlpull.mxp1.MXParser.parseXmlDecl(MXParser.java:2592)
              at org.xmlpull.mxp1.MXParser.parsePI(MXParser.java:2466)
              at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1447)
              at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
              at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
              at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
              ... 302 more
      

      Cause

      The XML parser used by Bamboo, xmlpull, only supports XML version 1.0. Bamboo needs to use a different parser to be able to support XML 1.1 and import the latest Jenkins data.

      Workaround

      Edit all the .xml files within the Jenkins directory hierarchy and change the files to use XML version 1.0.

      <?xml version="1.0" encoding="UTF-8" ?>

            [BAM-20166] Jenkins import fails due to xml version 1.1

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 2975345 ] New: JAC Bug Workflow v3 [ 3386069 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Krystian Brazulewicz made changes -
            Resolution New: Duplicate [ 3 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            Krystian Brazulewicz made changes -
            Link New: This issue duplicates BAM-20409 [ BAM-20409 ]
            Pawel Skierczynski made changes -
            Occurrence Factor New: 10% [ 12830 ]
            Status Original: Needs Triage [ 10030 ] New: Open [ 1 ]
            Chris Berry (Inactive) made changes -
            Description Original: Problem
            Write a brief step by step description of the symptoms of the problem including any errors, eg:

            When making the following actions...

            1

            2

            3

            The following appears in the XXXXXXXXXXX.log

            FILL IN LOG
            Diagnosis
            Environment

            Any relevant information that clarifies the environment that an issue occurs in such as Database (type and version/s), Browser (type and version/s), OS (type and version/s), Java version, etc...

            Diagnostic Steps

            Any specific steps necessary to reproduce the issue that will ensure that the customer is actually experiencing the same problem as the one that that is being described.

            Steps like these will often involve checking data using SQL SELECT queries to see if the application is in a particular state OR any checks to ensure that the customers environment is in a state that will bring about the described problem

            This section is optional, especially if the problem is triggered regardless of the environment and diagnosis

            Cause
            Fill in the root cause for the issue here, try to answer why this problem comes up in the first place.

            Workaround
            Workarounds are ways to temporally circumvent a problem, although it still exists in the application.

            This is optional depending whether or not a workaround exists, maybe a resolution exists instead

            Give specific step by step directions

            You can use a bulleted or numbered list

            New: h2. Problem

            Since Jenkins 2.107 the config files used by Jenkins are written using XML version 1.1
            [Jenkins Upgrade Guide|https://jenkins.io/doc/upgrade-guide/2.107/]

            When trying to import from Jenkins 2.107 or later the import will fail.

            The following appears in the atlassian-bamboo.log
            {noformat}
            2018-10-31 16:56:16,102 INFO [http-nio-8085-exec-2] [SelectJobsForImport] Reading Jenkins data from /JENKINS_LOCATION
            2018-10-31 16:56:16,171 ERROR [http-nio-8085-exec-2] [Jenkins] Exception loading Jenkins configuration
            java.io.IOException: Unable to read /JENKINS_LOCATION/config.xml
                    at hudson.XmlFile.unmarshal(XmlFile.java:162)
                    at jenkins.model.Jenkins.loadConfiguration(Jenkins.java:587)
                    at jenkins.model.Jenkins.setRootDir(Jenkins.java:497)
                    at com.atlassian.bamboo.jenkins.importer.core.JenkinsDataReader.initializeDataDirectories(JenkinsDataReader.java:197)
            ...
                    at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:65)
                    at hudson.XmlFile.unmarshal(XmlFile.java:160)
                    ... 294 more
            Caused by: org.xmlpull.v1.XmlPullParserException: only 1.0 is supported as <?xml version not '1.1' (position: START_DOCUMENT seen <?xml version=\'1.1\'... @1:19)
                    at org.xmlpull.mxp1.MXParser.parseXmlDeclWithVersion(MXParser.java:2608)
                    at org.xmlpull.mxp1.MXParser.parseXmlDecl(MXParser.java:2592)
                    at org.xmlpull.mxp1.MXParser.parsePI(MXParser.java:2466)
                    at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1447)
                    at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
                    at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
                    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
                    ... 302 more
            {noformat}

            h2. Cause

            The XML parser used by Bamboo, xmlpull, only supports XML version 1.0. Bamboo needs to use a different parser to be able to support XML 1.1 and import the latest Jenkins data.

            h2. Workaround

            Edit all the .xml files within the Jenkins directory hierarchy and change the files to use XML version 1.0.

            {quote}
            <?xml version="1.0" encoding="UTF-8" ?>
            {quote}
            Chris Berry (Inactive) made changes -
            Description New: Problem
            Write a brief step by step description of the symptoms of the problem including any errors, eg:

            When making the following actions...

            1

            2

            3

            The following appears in the XXXXXXXXXXX.log

            FILL IN LOG
            Diagnosis
            Environment

            Any relevant information that clarifies the environment that an issue occurs in such as Database (type and version/s), Browser (type and version/s), OS (type and version/s), Java version, etc...

            Diagnostic Steps

            Any specific steps necessary to reproduce the issue that will ensure that the customer is actually experiencing the same problem as the one that that is being described.

            Steps like these will often involve checking data using SQL SELECT queries to see if the application is in a particular state OR any checks to ensure that the customers environment is in a state that will bring about the described problem

            This section is optional, especially if the problem is triggered regardless of the environment and diagnosis

            Cause
            Fill in the root cause for the issue here, try to answer why this problem comes up in the first place.

            Workaround
            Workarounds are ways to temporally circumvent a problem, although it still exists in the application.

            This is optional depending whether or not a workaround exists, maybe a resolution exists instead

            Give specific step by step directions

            You can use a bulleted or numbered list

            Chris Berry (Inactive) created issue -

              Unassigned Unassigned
              cberry@atlassian.com Chris Berry (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: