I am accessing the jnlp as an applet through a jsf page running on Weblogic server. The jnlp, jar and jspx page are all in the same directory. When I run the app, and view it in a browser, I get the following exception in java console:
network: Connecting http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar with proxy=DIRECT
network: Connecting http://127.0.0.1:7101/ with proxy=DIRECT
network: Server http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar requesting to set-cookie with "JSESSIONID=W2DFT73bF2zGFjDRnPnT22jGkhfMH7MTLy1vYJKsBLhG0L1FJTlx!1554553999; path=/; HttpOnly"
network: ResponseCode for http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar : 200
network: Encoding for http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar : null
network: Sever response: (length: -1, lastModified: Wed Dec 31 16:00:00 PST 1969, downloadVersion: null, mimeType: text/html)
network: Downloading resource: http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar
Content-Length: -1
Content-Encoding: null
Got ConfigEvent[type=SetVisible, value=true]
Got DownloadEvent[type=load,loaded=0, total=-1, percent=1]
network: Wrote URL http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar to File C:\Documents and Settings\nprasant.APPLICATIONS\Local Settings\Application Data\Sun\Java\Deployment\cache\6.0\10\1d8cbd8a-6153ec47-temp
network: Remove cache entry:
network: Disconnect connection to http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar
java.util.zip.ZipException: ZIP file must have at least one entry
at java.util.zip.ZipOutputStream.finish(Unknown Source)
at java.util.zip.DeflaterOutputStream.close(Unknown Source)
at java.util.zip.ZipOutputStream.close(Unknown Source)
at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Aborting launch ...
basic: exception: Unable to load resource: http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar.
network: CleanupThread used 306886 us
ExitException[ 3]com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar
at sun.plugin2.applet.JNLP2Manager.downloadResources(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ignored exception: ExitException[ 3]com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar
Got ErrorEvent[url=http://127.0.0.1:7101/Application1-ViewController1-context-root/faces/StateModelEditor.jar label=null cause=null
Aborting launch ...
I can directly download the jar file from the url listed in the error. The jnlp file I use is:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="StateModelEditor.jnlp">
<information>
<title>StateModelEditor</title>
<vendor>nprasant</vendor>
<description>Sample JavaFX 2.0 application.</description>
<offline-allowed/>
</information>
<resources os="Windows" arch="x86">
<jfx:javafx-runtime version="2.0+" href="http://download.oracle.com/otn-pub/java/javafx/javafx-windows-i586__Vlatest.exe "/>
</resources>
<resources os="Windows" arch="x64">
<jfx:javafx-runtime version="2.0+" href="http://download.oracle.com/otn-pub/java/javafx/javafx-windows-x64__Vlatest.exe "/>
</resources>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="StateModelEditor.jar" size="22925" download="eager" />
</resources>
<applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="StateModelEditor" />
<jfx:javafx-desc width="800" height="600" main-class="oracle.apps.crm.orderCapture.core.StateModelEditor" name="StateModelEditor" />
<update check="background"/>
</jnlp>
I tried compressing jar but that didn't make any difference. I am behind a proxy but playing around with all the java network settings was of no use as well.
Any pointers as to what could be the issue?