Can you please run the following groovy script in the Jenkins Script Console ("Manage Jenkins / Script Console") to understand from which jar the DocumentBuilderFactory was loaded?
Can you please run the following groovy script in the Jenkins Script Console ("Manage Jenkins / Script Console") to understand from which jar the DocumentBuilderFactory was loaded?
{noformat} DocumentBuilderFactory: com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl@52728a9b class com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -> source not found {noformat}
I don't really get how to resolve this. Should I add -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl to the starting Jenkins Process or to the maven run?
seems adding the -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl to the JAVA_OPTS seem to work. But I'm still confused why this is needed.
> But why is "source not found" the expected behavoir? shouldn't there be a valid class loaded?
"source not found" means that it is provided by the JVM jar(s) directly and this is what we desire. Sometimes, it's an old/outdated XML parsing implementation that it loaded and you get a source such as ".../xercesImpl-2.6.2.jar". It is often caused by plugins forgetting to exclude old versions of Xerces from their dependencies.
class org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -> file:/var/jenkins_home/plugins/registry_reporter/WEB-INF/lib/xercesImpl-2.6.2.jar
> But why is "source not found" the expected behavoir? shouldn't there be a valid class loaded?
"source not found" means that it is provided by the JVM jar(s) directly and this is what we desire. Sometimes, it's an old/outdated XML parsing implementation that it loaded and you get a source such as ".../xercesImpl-2.6.2.jar". It is often caused by plugins forgetting to exclude old versions of Xerces from their dependencies.
> openjdk version "1.8.0_212"
This is a JDK that works well. The problem is likely to be a plugin that pull an outdated version of XercesImpl
{noformat}
class org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -> file:/var/jenkins_home/plugins/registry_reporter/WEB-INF/lib/xercesImpl-2.6.2.jar
Markus Till can you please search for any xerces jar file in the plugins that you have loaded in your instance. It is typically outdated versions of xerces that cause issues with the DocumentBuilderFactory. Can you on the master run "find -iname "xerces"" under "JENKINS_HOME/plugins".
It looks like
$ cd <JENKINS_HOME>/plugins
# verify that we are in the right folder verifying the number of jar files we found
$ find -iname "*.jar" | wc -
$ find -iname "*xerces*.jar"