当我浏览服务器的IP地址时,我有一个可以通过java web start加载的jar。 一旦我尝试服务器名称,我就会得到以下异常:
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 :(得分:12)
我已经将java代理设置更改为直接连接 - 并且它可以正常工作。
答案 1 :(得分:6)
答案 2 :(得分:2)
在相应服务器的主机文件(C:\ Windows \ System32 \ drivers \ etc \ host)中包含您的IP地址:
示例条目:
10.100.101.102 server1.us.vijay.com Vijay的服务器
答案 3 :(得分:1)
我不确定问题究竟是什么,但我查看了一个jnlp文件,并且已经完成了每个jar文件的完整路径。 (我有一个生成app.jnlp文件的速度模板,当我的maven构建运行时,该文件将它放在所有正确的位置)
我发现的一件事是由webstart运行时重新下载jnlp文件,它使用href属性(在jnlp文件中留空)重新下载文件。我会从那里开始,并尝试将完整路径添加到jnlp文件中...我发现webstart是一个善变的情妇!
答案 4 :(得分:0)
如果其他人因为他们正在尝试设置Jenkins奴隶而来到这里,那么您需要将主机的url设置为它实际使用的url。
在主机上,转到Manage Jenkins&gt;配置系统并编辑&#34; Jenkins URL&#34;
答案 5 :(得分:0)
我遇到了同样的问题,我使用服务器地址更新了hosts文件并且工作正常
答案 6 :(得分:0)
将Java代理设置更改为直接连接并不能解决我的问题。
对我有用的东西
答案 7 :(得分:0)
这对我也有用,非常感谢
将Java代理设置更改为直接连接并不能解决我的问题。
什么对我有用:
Run "Configure Java" as administrator.
Go to Advanced
Scroll to bottom
Under: "Advanced Security Settings" uncheck "Use SSL 2.0 compatible ClientHello format"
Save
答案 8 :(得分:0)