Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8035576

JWS offline-allowed connectionException

    XMLWordPrintable

Details

    • x86
    • windows_xp

    Description

      FULL PRODUCT VERSION :
      java version "1.7.0_51"
      Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
      Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Versión 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      When using offline-allowed with shortcut online="true" there are cases where it doesn't work as expected in the specs.
      I can delete the WAS server folder containing the jnlp and .jar files without any problem, it load them from the cache (as expected), I can disconnect my computer from the network and it loads from the cache, updatings are working perfect... but If I disconnect the WAS service daemon from the machine (or I modify my hosts file to point the url to an unexistent ip or localhost) it doesn't load from the cache and I got a ConnectException in the launcher



      jnlp file with:

      (...)
       <shortcut online="true" install="true">
            <desktop/>
            <menu submenu="XXXX">
             <menu submenu="XXXX"/>
            </menu>
          </shortcut>
          <offline-allowed/>
        </information>

      and the update check tried with all combinations like:

       <update check="always" policy="always">

      or

      <update check="timeout" policy="prompt-run"/>,

      <update check="background" policy="always">

      and anyone works in this case

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      load application with jnlp like our jnlp, then modifying local computer host file to resolve the url to 127.0.0.1 (without a WAS sever) or to an unexistent ip if you can't shutdown server or disconnecting it from the network

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      It should ignore the ConnectException and load the app from cache as in another cases like when I remove the folder from the server
      ACTUAL -
      ConnectException in Launcher causing to not load from Cache

      ERROR MESSAGES/STACK TRACES THAT OCCUR :


      "com.sun.deploy.net.FailedDownloadException: No se ha podido cargar el recurso: http://hiddenURL:80/yyy/xxx.jnlp
      at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.downloadUpdate(Unknown Source)
      at com.sun.deploy.model.ResourceProvider.downloadUpdate(Unknown Source)
      at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
      at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
      at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
      at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
      at com.sun.javaws.Launcher.launch(Unknown Source)
      at com.sun.javaws.Main.launchApp(Unknown Source)
      at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
      at com.sun.javaws.Main.access$000(Unknown Source)
      at com.sun.javaws.Main$1.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)"

      caused by:

      java.net.ConnectException: Connection refused: connect
      at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at sun.net.NetworkClient.doConnect(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.openServer(Unknown Source)
      at sun.net.www.http.HttpClient.&lt;init&gt;(Unknown Source)
      at sun.net.www.http.HttpClient.New(Unknown Source)
      at sun.net.www.http.HttpClient.New(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
      at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
      at com.sun.deploy.cache.ResourceProviderImpl.downloadUpdate(Unknown Source)
      at com.sun.deploy.model.ResourceProvider.downloadUpdate(Unknown Source)
      at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
      at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
      at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
      at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
      at com.sun.javaws.Launcher.launch(Unknown Source)
      at com.sun.javaws.Main.launchApp(Unknown Source)
      at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
      at com.sun.javaws.Main.access$000(Unknown Source)
      at com.sun.javaws.Main$1.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      and console output:

      #### Java Web Start Error:
      #### No se ha podido cargar el recurso: http://hiddenURL:80/yyy/xxx.jnlp


      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Activity

          People

            herrick Andy Herrick (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: