2010-04-15 248 views
7

我有,當我瀏覽過的服務器的IP地址加載偉大的Java Web Start的一個罐子裏。 有一次,我嘗試在服務器,而不是我得到以下異常:Java Web Start的 - 無法加載資源

 
com.sun.deploy.net.FailedDownloadException: Unable to load resource: 
    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) 

包裝的異常:

 
java.io.FileNotFoundException: 
    at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) 
    at java.lang.reflect.Constructor.newInstance(Unknown Source) 
    at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source) 
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(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.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) 
Caused by: java.io.FileNotFoundException: 
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) 
    at java.net.HttpURLConnection.getResponseCode(Unknown Source) 
    ... 15 more 

JNLP:

<?xml version="1.0" encoding="utf-8"?> 
<jnlp 
    spec="1.0+" 
    codebase="http://servername/Site/Views/.." 
    href=""> 
    <information> 
     <title>title</title> 
     <vendor>vendor</vendor> 
     <description>description</description> 
     <description kind="short">short</description> 
     <icon href="../../icon.gif" /> 
    </information> 
    <security> 
     <all-permissions/> 
    </security> 
    <resources> 

     <j2se version="1.5+" java-vm-args="-Xmx1000M -Xms150M" initial-heap-size="150M" max-heap-size="1000M" /> 
     <j2se version="1.4.2+" href="http://java.sun.com/products/autodl/j2se" java-vm-args="-Xmx1000M -Xms150M" initial-heap-size="150M" max-heap-size="1000M" /> 

     <jar href="/file.jar"/> 
    </resources> 
    <application-desc main-class="com...."> 
     <argument>CD6B172DEC34924D83EA64A61A6550BE1271325929392</argument> 
     <argument>http://servername/file.asp</argument> 
     <argument>/Site</argument> 
    </application-desc> 
</jnlp> 

任何想法,我應該怎麼找?

+0

什麼是您的JNLP/webstart配置文件看起來像? – 2010-04-15 10:13:26

回答

12

我已經改變了Java代理設置直接連接 - 和它的作品。

+1

+1但是爲什麼?瀏覽器來直接連接????? WTF! – Sydwell 2013-11-13 08:48:05

+0

代理設置可以在「Java控制面板」(javacpl或「配置Java」下視窗)中找到 – 2017-08-11 09:42:14

1

我不知道到底是什麼問題,但我已經看過我的JNLP文件中的一個,我已經把完整路徑,以我的每一個jar文件。 (我有一個速度模板,生成app.jnlp文件,當我的Maven構建運行時,它將它放置在所有正確的位置)

我見過的一件事情是jnlp文件被重新下載webstart運行時,它使用href屬性(在jnlp文件中留空)來重新下載文件。我會從那裏開始,並嘗試將完整路徑添加到jnlp文件中...我發現webstart是一個善變的女主人!

2

包括你的IP地址,在您的主機文件:爲各服務器(C \ Windows \ System32下\ drivers \ etc下\主機):

條目示例:

10.100.101.102 server1.us.vijay .COM維傑的服務器

0

如果別人送過來,因爲他們正試圖建立一個詹金斯奴隸,那麼你需要設置主機到它的實際使用一個網址。

在主機上,去管理詹金斯>配置系統和編輯「詹金斯URL」

0

我得到了同樣的問題,我更新了主機與服務器地址文件,它的工作