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

JDK Auto install throws FATAL: org/apache/xml/utils/PrefixResolver

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • None
    • Windows 2003 R2 SP2

      It appears that JDK auto install has been broken since version 1.433. It last worked on version 1.432. Below is the error that you get when it tries to auto install the JDK.

      Installing JDK jdk-6u24-oth-JPR
      Downloading JDK from http://download.oracle.com/otn/java/jdk/6u24-b07//jdk-6u24-windows-x64.exe
      FATAL: org/apache/xml/utils/PrefixResolver
      java.lang.NoClassDefFoundError: org/apache/xml/utils/PrefixResolver
      	at com.gargoylesoftware.htmlunit.html.DomNamespaceNode.getLocalName(DomNamespaceNode.java:81)
      	at com.gargoylesoftware.htmlunit.html.HtmlElement.getNodeName(HtmlElement.java:308)
      	at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.addNodeToRightParent(HTMLParser.java:636)
      	at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.startElement(HTMLParser.java:610)
      	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      	at org.cyberneko.html.HTMLTagBalancer.callStartElement(HTMLTagBalancer.java:1126)
      	at org.cyberneko.html.HTMLTagBalancer.startElement(HTMLTagBalancer.java:734)
      	at org.cyberneko.html.filters.DefaultFilter.startElement(DefaultFilter.java:136)
      	at org.cyberneko.html.filters.NamespaceBinder.startElement(NamespaceBinder.java:278)
      	at org.cyberneko.html.HTMLScanner$ContentScanner.scanStartElement(HTMLScanner.java:2697)
      	at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2013)
      	at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:907)
      	at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)
      	at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)
      	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      	at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:901)
      	at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:350)
      	at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:304)
      	at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:134)
      	at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:101)
      	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:449)
      	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:332)
      	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:389)
      	at hudson.tools.JDKInstaller.locate(JDKInstaller.java:369)
      	at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:125)
      	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
      	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
      	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:150)
      	at hudson.model.JDK.forNode(JDK.java:112)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:822)
      	at hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:59)
      	at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:155)
      	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:673)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
      	at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:567)
      	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:455)
      	at hudson.model.Run.run(Run.java:1404)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:470)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:230)
      Caused by: java.lang.ClassNotFoundException: org.apache.xml.utils.PrefixResolver
      	at java.net.URLClassLoader$1.run(Unknown Source)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(Unknown Source)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at winstone.classLoader.WebappClassLoader.loadClass(WebappClassLoader.java:83)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	... 40 more
      

          [JENKINS-11420] JDK Auto install throws FATAL: org/apache/xml/utils/PrefixResolver

          Jim McCaskey added a comment -

          I think this is happening because of the fix for JENKINS-10851. I think this bit here needs xalan and that issue removed it to get Jenkins working on AIX.

          https://github.com/jenkinsci/jenkins/pull/256/files

          At least it looks similar. I have not walked any code.

          Jim McCaskey added a comment - I think this is happening because of the fix for JENKINS-10851 . I think this bit here needs xalan and that issue removed it to get Jenkins working on AIX. https://github.com/jenkinsci/jenkins/pull/256/files At least it looks similar. I have not walked any code.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/pom.xml
          core/src/main/java/hudson/tools/JDKInstaller.java
          http://jenkins-ci.org/commit/jenkins/e1691a1f2fc5246024a416a20e109faeab0e26ab
          Log:
          [FIXED JENKINS-11420] rewrote the JDK installer to avoid using HtmlUnit.

          This lets us get rid of Xalan safely (as well as other often problematic
          dependencies like nekohtml + Xerces combo), and reduce the dependency
          footprint.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/pom.xml core/src/main/java/hudson/tools/JDKInstaller.java http://jenkins-ci.org/commit/jenkins/e1691a1f2fc5246024a416a20e109faeab0e26ab Log: [FIXED JENKINS-11420] rewrote the JDK installer to avoid using HtmlUnit. This lets us get rid of Xalan safely (as well as other often problematic dependencies like nekohtml + Xerces combo), and reduce the dependency footprint.

          dogfood added a comment -

          dogfood added a comment - Integrated in jenkins_main_trunk #1259

          Saager Mhatre added a comment - - edited

          Is there a workaround for older stable releases? I'm facing this problem on 1.424.1 on a 32-bit Ububtu Maverick.

          Saager Mhatre added a comment - - edited Is there a workaround for older stable releases? I'm facing this problem on 1.424.1 on a 32-bit Ububtu Maverick.

          I'm seeing this in 1.443, Any idea when the fix will be in a release?

          Scott MacDonald added a comment - I'm seeing this in 1.443, Any idea when the fix will be in a release?

          mcrooney added a comment -

          Saager, I was also on 1.424.1 and in my case the workaround was to upgrade to 1.447

          So Scott, you'll find it arrived at latest in that version.

          mcrooney added a comment - Saager, I was also on 1.424.1 and in my case the workaround was to upgrade to 1.447 So Scott, you'll find it arrived at latest in that version.

          John Wildman added a comment -

          Shouldn't this be fixed in the LTS releases? We just upgraded to 1.424.2 and it's still broken. Better yet, what if the JDK down-loader was a plugin so we could upgrade it independently?

          Thanks.

          John Wildman added a comment - Shouldn't this be fixed in the LTS releases? We just upgraded to 1.424.2 and it's still broken. Better yet, what if the JDK down-loader was a plugin so we could upgrade it independently? Thanks.

          vjuranek added a comment -

          Hi,
          if you think it should be backported into LTS, (next time) you should increase the priority to "critical" or "blocker" or drop and email to jenkins-dev list. Major bugfixes are not backported by default.
          Thanks

          vjuranek added a comment - Hi, if you think it should be backported into LTS, (next time) you should increase the priority to "critical" or "blocker" or drop and email to jenkins-dev list. Major bugfixes are not backported by default. Thanks

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/pom.xml
          core/src/main/java/hudson/tools/JDKInstaller.java
          http://jenkins-ci.org/commit/jenkins/fa134e68210529ac532fbd8974c97dbce411c23e
          Log:
          [FIXED JENKINS-11420] rewrote the JDK installer to avoid using HtmlUnit.

          This lets us get rid of Xalan safely (as well as other often problematic
          dependencies like nekohtml + Xerces combo), and reduce the dependency
          footprint.
          (cherry picked from commit e1691a1f2fc5246024a416a20e109faeab0e26ab)

          Conflicts:

          changelog.html
          core/pom.xml
          core/src/main/java/hudson/tools/JDKInstaller.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/pom.xml core/src/main/java/hudson/tools/JDKInstaller.java http://jenkins-ci.org/commit/jenkins/fa134e68210529ac532fbd8974c97dbce411c23e Log: [FIXED JENKINS-11420] rewrote the JDK installer to avoid using HtmlUnit. This lets us get rid of Xalan safely (as well as other often problematic dependencies like nekohtml + Xerces combo), and reduce the dependency footprint. (cherry picked from commit e1691a1f2fc5246024a416a20e109faeab0e26ab) Conflicts: changelog.html core/pom.xml core/src/main/java/hudson/tools/JDKInstaller.java

            Unassigned Unassigned
            jmccaske Jim McCaskey
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: