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

JNLP link on web page does not run due to missing file.

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • deploy-plugin
    • None
    • Platform: All, OS: All

      When invoking JNLP button on
      http://hudson.gotdns.com/wiki/display/JENKINS/Meet+Hudson invocation fails.

      The Hudson Console window shows:

      [Winstone 2009/01/14 12:49:55] - Beginning extraction from war file
      [Winstone 2009/01/14 12:49:55] - Container startup failed

      winstone.WinstoneException: The warfile supplied is unavailable or invalid
      (C:\Documents and Settings\tra\Desktop)
      at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:214)
      at winstone.HostConfiguration.<init>(HostConfiguration.java:73)
      at winstone.HostGroup.initHost(HostGroup.java:85)
      at winstone.HostGroup.<init>(HostGroup.java:45)
      at winstone.Launcher.<init>(Launcher.java:196)
      at winstone.Launcher.main(Launcher.java:391)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at Main.main(Main.java:70)
      at JNLPMain.main(JNLPMain.java:27)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      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)

      where "tra" is my login.

          [JENKINS-2844] JNLP link on web page does not run due to missing file.

          Note to myself:

          JDK6u10 appears to have changed the behavior of the JarFile.getName() to return
          "". The name field still has the full name, so perhaps that's the work around.

          TODO: check the source code and check why this method now returns "".

          -------------
          public static File whoAmI() throws IOException, URISyntaxException

          { URL classFile = Main.class.getClassLoader().getResource("Main.class"); // JNLP returns the URL where the jar was originally placed (like http://hudson.dev.java.net/...) // not the local cached file. So we need a rather round about approach to get to // the local file name. return new File(((JarURLConnection)classFile.openConnection()).getJarFile().getName()); }

          -------------

          Kohsuke Kawaguchi added a comment - Note to myself: JDK6u10 appears to have changed the behavior of the JarFile.getName() to return "". The name field still has the full name, so perhaps that's the work around. TODO: check the source code and check why this method now returns "". ------------- public static File whoAmI() throws IOException, URISyntaxException { URL classFile = Main.class.getClassLoader().getResource("Main.class"); // JNLP returns the URL where the jar was originally placed (like http://hudson.dev.java.net/...) // not the local cached file. So we need a rather round about approach to get to // the local file name. return new File(((JarURLConnection)classFile.openConnection()).getJarFile().getName()); } -------------

          Jesse Glick added a comment -

          Already filed.

              • This issue has been marked as a duplicate of 2326 ***

          Jesse Glick added a comment - Already filed. This issue has been marked as a duplicate of 2326 ***

            Unassigned Unassigned
            ravn ravn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: