• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Java build 1.7.0_06-b24 64-bit

      When I invoke http://jenkins-ci.org/jenkins.jnlp found at https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins#MeetJenkins-TestDrive I get:

      java.lang.NullPointerException
      at com.sun.javaws.Launcher.executeApplication(Unknown Source)
      at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
      at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      I tracked the problem down to a missing "codebase" attribute on the top-level "jnlp" element. Once you provide a value it Jenkins launches just fine.

      According to http://weblogs.java.net/blog/kohsuke/archive/2009/07/why_cant_we_get.html this attribute was made optional in Java6 update 18 but then was made mandatory again for security reasons.

          [JENKINS-14924] jenkins.jnlp throws NullPointerException

          evernat added a comment -

          Issue reproduced by opening http://jenkins-ci.org/jenkins.jnlp in a browser.
          The solution is to add codebase in the jenkins.jnlp file:
          <jnlp spec="1.0+" codebase="http://jenkins-ci.org/jenkins.jnlp">

          Note that the wiki page still says "Launch Jenkins through Java Web Start for a test drive.", but there is no link in the page to do so.

          There should be a link to http://jenkins-ci.org/jenkins.jnlp in this phrase.

          evernat added a comment - Issue reproduced by opening http://jenkins-ci.org/jenkins.jnlp in a browser. The solution is to add codebase in the jenkins.jnlp file: <jnlp spec="1.0+" codebase="http://jenkins-ci.org/jenkins.jnlp"> Note that the wiki page still says "Launch Jenkins through Java Web Start for a test drive.", but there is no link in the page to do so. There should be a link to http://jenkins-ci.org/jenkins.jnlp in this phrase.

          evernat added a comment -

          <j2se version="1.5+"/>
          should also be replaced by
          <j2se version="1.6+"/>

          evernat added a comment - <j2se version="1.5+"/> should also be replaced by <j2se version="1.6+"/>

          Oleg Nenashev added a comment -

          Is this bug alive?

          Oleg Nenashev added a comment - Is this bug alive?

          evernat added a comment -

          Yes absolutely.
          It's just a matter of adding a static codebase in a file (and 1.6+ by the way), and adding a link in the phrase "Launch Jenkins through Java Web Start for a test drive." of the wiki page.
          Except that, it works perfectly.

          evernat added a comment - Yes absolutely. It's just a matter of adding a static codebase in a file (and 1.6+ by the way), and adding a link in the phrase "Launch Jenkins through Java Web Start for a test drive." of the wiki page. Except that, it works perfectly.

          Oleg Nenashev added a comment -

          Reassigned the issue to the core

          Oleg Nenashev added a comment - Reassigned the issue to the core

          Kohsuke Kawaguchi added a comment - - edited

          I just saw the same issue trying to launch JNLP slaves. Turns out in these versions of JDK, if the JNLP file couldn't be retrieved (for example due to the security setting disallowing anonymous users to access JNLP files), then tha web start launcher fails with thhe same symptom.

          If you suspect this to be the case, you can verify by trying to download the JNLP file via wget or some such tool that doesn't have your browser authentication cookie. To work around this, you should follow the command line instruction to run "java -jar slave.jar"

          Kohsuke Kawaguchi added a comment - - edited I just saw the same issue trying to launch JNLP slaves. Turns out in these versions of JDK, if the JNLP file couldn't be retrieved (for example due to the security setting disallowing anonymous users to access JNLP files), then tha web start launcher fails with thhe same symptom. If you suspect this to be the case, you can verify by trying to download the JNLP file via wget or some such tool that doesn't have your browser authentication cookie. To work around this, you should follow the command line instruction to run "java -jar slave.jar"

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          jenkins.jnlp
          http://jenkins-ci.org/commit/backend-jenkins-ci.org-webcontents/f3912709ffa9e048dcb4e0df4e28e2e1a2b5d19d
          Log:
          [FIXED JENKINS-14924]

          Specify the codebase attribute

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: jenkins.jnlp http://jenkins-ci.org/commit/backend-jenkins-ci.org-webcontents/f3912709ffa9e048dcb4e0df4e28e2e1a2b5d19d Log: [FIXED JENKINS-14924] Specify the codebase attribute

            Unassigned Unassigned
            cowwoc cowwoc
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: