我無法在Glassfish 3.3.1上運行jnlp(webstart)。控制檯說:Glassfish3 + Webstart + JNLP不會啓動
java.io.FileNotFoundException: http://localhost:8080/myapp/server
的JNLP代碼庫的設置如下:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://localhost:8080/myapp">
<information>
<title>My App </title>
<vendor>IT Solutions</vendor>
<icon href="address.gif"/>
<description>My App</description>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.6+"/>
<jar href="proweb.jar"/>
<jar href="commons-logging-1.0.jar"/>
<jar href="commons-discovery.jar"/>
<jar href="axis.jar"/>
<jar href="jaxrpc-api-osgi.jar"/>
<jar href="javax.servlet.jar"/>
<jar href="swingx-all-1.6.3.jar"/>
<jar href="my_app.jar"/>
</resources>
<application-desc
name="MatrixApplet"
main-class="com.myapp.client.MyApplet"
width="800"
height="600">
<argument>http://localhost:8080</argument>
<argument>/myapp/server</argument>
<argument>http://localhost:8080/myreport/jsp/Launch.jsp</argument>
</application-desc>
</jnlp>
將瓶子下載並拋出異常。我無法使用調試器,因爲啓動失敗,並在控制檯中出現上述錯誤消息。
這個以前一直運行良好。如果發生任何變化,我不能指出什麼變化。我使用ant來構建各種工件,並且build.xml中沒有任何更改(如果需要,可以發佈)。另外,我看到bin下的一個編譯後的類文件夾中有一個磚塊顏色很大的X(不是常用的簡單紅色圖標)。我無法在Eclipse站點找到該圖標的含義。
我也試着運行命令行MyApplet,但得到這個堆棧跟蹤:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: javax/jnlp/UnavailableServiceException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: javax.jnlp.UnavailableServiceException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
一兩件事。在部署EAR文件之前,我刪除了glassfish3/glassfish/domains/domain1/applications/dir下的所有內容。那不好嗎?
有人在這裏建議使用glassfish的獨立實例。試過了。
的最後一件事:在瀏覽器下面的2 URL我們給HTTP-404(未找到)
http://localhost:8080/myapp/server
而如果我給 http://localhost:8080/myapp/proweb.jar
罐子下載。
任何幫助? 感謝你