-
Bug
-
Resolution: Won't Fix
-
Critical
-
1.605 Win64 Job DSL 1.30
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
- is blocking
-
JENKINS-7312 The FindBugs plugin can't find the SAXParser under certain circumstances
-
- Resolved
-
- is duplicated by
-
JENKINS-38895 Job DSL fails to add new job
-
- Closed
-
-
JENKINS-51189 Job DSL fails to create new job
-
- Closed
-
- is related to
-
JENKINS-20070 Restore sax parser system property after XML parsing
-
- Resolved
-
Had the same issue today with jenkins 2.107.1 while trying to POST a config.xml
Clearing the property did not help. "Fixed" it the hard way, by executing the following code into the script console:
CLEARLY NOT a good fix, but a fix never the less if anyone is blocked by this issue. Of course if you reboot jenkins the fix is gone.
Funny thing is that the ClassLoader where the script console is executing did already have the SAXParser class (Class.forName("..") worked) but the default classLoaded did not (Class.forName("..", false, ClassLoader.getSystemClassLoader()) => null)