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

Sporadic IOException: Failed to persist config

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: analysis-core-plugin
    • Labels:
    • Environment:
      1.605 Win64 Job DSL 1.30
    • Similar Issues:

      Description

      When creating the projects, I am getting sporadic failures in the jenkins error log as seen below. Jobs then fail to be updated.

      INFO: createOrUpdateConfig for WebContent
      Mar 23, 2015 10:29:12 AM javaposse.jobdsl.plugin.JenkinsJobManagement updateExistingItem
      WARNING: Error writing updated item to file.
      java.io.IOException: Failed to persist config.xml
      	at hudson.model.AbstractItem.updateByXml(AbstractItem.java:646)
      	at javaposse.jobdsl.plugin.JenkinsJobManagement.updateExistingItem(JenkinsJobManagement.java:378)
      	at javaposse.jobdsl.plugin.JenkinsJobManagement.createOrUpdateConfig(JenkinsJobManagement.java:123)
      	at javaposse.jobdsl.dsl.DslScriptLoader.extractGeneratedJobs(DslScriptLoader.java:120)
      	at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngine(DslScriptLoader.java:97)
      	at javaposse.jobdsl.plugin.ExecuteDslScripts.perform(ExecuteDslScripts.java:203)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
      	at hudson.model.Build$BuildExecution.build(Build.java:203)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)
      	at hudson.model.Run.execute(Run.java:1751)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:89)
      	at hudson.model.Executor.run(Executor.java:240)
      Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
      java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
      	at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:230)
      	at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:191)
      	at jenkins.util.xml.XMLUtils.safeTransform(XMLUtils.java:48)
      	at hudson.model.AbstractItem.updateByXml(AbstractItem.java:641)
      	... 14 more
      Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:430)
      	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
      	at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:82)
      	at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:228)
      	... 17 more
      

        Attachments

        1. support_2016-07-01_13.06.55.zip
          1.06 MB
        2. support_KO.zip
          18 kB
        3. support_OK.zip
          18 kB
        4. support.zip
          29 kB

          Issue Links

            Activity

            Hide
            croesus Croesus Kall added a comment -

            How does one go about finding which plugin alters the property?

            I tried this in the plugin folder for jenkins:

            grep -ir 'org.xml.sax.driver' *
            

            And got this:

            Binary file analysis-core/WEB-INF/lib/xercesImpl-2.11.0.jar matches
            Binary file build-pipeline-plugin/WEB-INF/lib/xercesImpl-2.9.1.jar matches
            Binary file findbugs/WEB-INF/lib/library-2.0.4.jar matches
            Binary file selenium/WEB-INF/lib/selenium-server-standalone-2.41.0.jar matches
            

            I am guessing the 'xercedImpl' dependencies are ok, but perhaps findbugs or selenium might be the culprits ?

            Show
            croesus Croesus Kall added a comment - How does one go about finding which plugin alters the property? I tried this in the plugin folder for jenkins: grep -ir 'org.xml.sax.driver' * And got this: Binary file analysis-core/WEB-INF/lib/xercesImpl-2.11.0.jar matches Binary file build-pipeline-plugin/WEB-INF/lib/xercesImpl-2.9.1.jar matches Binary file findbugs/WEB-INF/lib/library-2.0.4.jar matches Binary file selenium/WEB-INF/lib/selenium-server-standalone-2.41.0.jar matches I am guessing the 'xercedImpl' dependencies are ok, but perhaps findbugs or selenium might be the culprits ?
            Hide
            circa10a Caleb Lemoine added a comment -

            I had this problem when updating the checkstyle plugin. In my case, I was on 3.38 but updated to 3.42. Then the problem occurred.

            Show
            circa10a Caleb Lemoine added a comment - I had this problem when updating the checkstyle plugin. In my case, I was on 3.38 but updated to 3.42. Then the problem occurred.
            Hide
            glechev Grigor Lechev added a comment - - edited

            Here you go, the common plugin is findbugs here.

            jenkins@8ed06777b6e7:/var/jenkins_home/plugins$ grep -ir 'org.xml.sax.driver' *
            Binary file analysis-core/WEB-INF/lib/xercesImpl-2.11.0.jar matches
            Binary file findbugs/WEB-INF/lib/library-2.0.4.jar matches
            Binary file fortify360/WEB-INF/lib/xercesImpl-2.6.2.jar matches
            Binary file jacoco/WEB-INF/lib/xercesImpl-2.9.1.jar matches
            Show
            glechev Grigor Lechev added a comment - - edited Here you go, the common plugin is findbugs here. jenkins@8ed06777b6e7:/ var /jenkins_home/plugins$ grep -ir 'org.xml.sax.driver' * Binary file analysis-core/WEB-INF/lib/xercesImpl-2.11.0.jar matches Binary file findbugs/WEB-INF/lib/library-2.0.4.jar matches Binary file fortify360/WEB-INF/lib/xercesImpl-2.6.2.jar matches Binary file jacoco/WEB-INF/lib/xercesImpl-2.9.1.jar matches
            Hide
            drulli Ulli Hafner added a comment - - edited

            Of course does xerces have a reference to org.xml.sax.driver. We need to look for write access of the corresponding environment variables.

            Show
            drulli Ulli Hafner added a comment - - edited Of course does xerces have a reference to org.xml.sax.driver. We need to look for write access of the corresponding environment variables.
            Hide
            andbtk Andrius Butkevicius added a comment -

            I am still having this problem. Using jenkins version 2.25 with all plugins updated.

            # grep -ir 'org.xml.sax.driver' *
            Binary file analysis-core/WEB-INF/lib/xercesImpl-2.11.0.jar matches
            Binary file findbugs/WEB-INF/lib/library-2.0.4.jar matches
            Binary file jacoco/WEB-INF/lib/xercesImpl-2.9.1.jar matches
            Binary file jdepend/WEB-INF/lib/xercesImpl-2.8.1.jar matches
            Binary file jshint-checkstyle/WEB-INF/lib/xercesImpl-2.8.1.jar matches
            Binary file jslint-checkstyle/WEB-INF/lib/xercesImpl-2.8.1.jar matches
            
            Show
            andbtk Andrius Butkevicius added a comment - I am still having this problem. Using jenkins version 2.25 with all plugins updated. # grep -ir 'org.xml.sax.driver' * Binary file analysis-core/WEB-INF/lib/xercesImpl-2.11.0.jar matches Binary file findbugs/WEB-INF/lib/library-2.0.4.jar matches Binary file jacoco/WEB-INF/lib/xercesImpl-2.9.1.jar matches Binary file jdepend/WEB-INF/lib/xercesImpl-2.8.1.jar matches Binary file jshint-checkstyle/WEB-INF/lib/xercesImpl-2.8.1.jar matches Binary file jslint-checkstyle/WEB-INF/lib/xercesImpl-2.8.1.jar matches

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                andrewk Andrew Kujtan
              • Votes:
                5 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: