users@glassfish.java.net

web start app client fails in 64-bit openjdk and glassfishV2.1

From: <glassfish_at_javadesktop.org>
Date: Thu, 05 Feb 2009 12:23:23 PST

Hi, I've seen a similar problem in other posts, but none of their solutions seem to work for me. I installed glassfish v2.1 as instructed and deployed a simple app to be launched via webstart in domains/domain1. Here is the error:

exception:

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/__JWSappclients/__appserver/aslib/appserv-jwsacc.jar
        at com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:1316)
        at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1456)
        at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1434)
        at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1537)
        at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1465)
        at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:211)
        at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:920)
        at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:803)
        at com.sun.javaws.Launcher.downloadResources(Launcher.java:1063)
        at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:638)
        at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:217)
        at com.sun.javaws.Launcher.launch(Launcher.java:111)
        at com.sun.javaws.Main.launchApp(Main.java:315)
        at com.sun.javaws.Main.continueInSecureThread(Main.java:219)
        at com.sun.javaws.Main$1.run(Main.java:107)
        at java.lang.Thread.run(Thread.java:619)

wrapped exception:
java.io.FileNotFoundException: http://localhost:8080/__JWSappclients/__appserver/aslib/appserv-jwsacc.jar
        at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1345)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1339)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:993)
        at com.sun.deploy.net.BasicHttpRequest.doRequest(BasicHttpRequest.java:225)
        at com.sun.deploy.net.BasicHttpRequest.doRequest(BasicHttpRequest.java:113)
        at com.sun.deploy.net.BasicHttpRequest.doGetRequest(BasicHttpRequest.java:78)
        at com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:1130)
        at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1456)
        at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1434)
        at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1537)
        at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1465)
        at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:211)
        at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:920)
        at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:803)
        at com.sun.javaws.Launcher.downloadResources(Launcher.java:1063)
        at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:638)
        at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:217)
        at com.sun.javaws.Launcher.launch(Launcher.java:111)
        at com.sun.javaws.Main.launchApp(Main.java:315)
        at com.sun.javaws.Main.continueInSecureThread(Main.java:219)
        at com.sun.javaws.Main$1.run(Main.java:107)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: http://localhost:8080/__JWSappclients/__appserver/aslib/appserv-jwsacc.jar
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1288)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
        at com.sun.deploy.net.BasicHttpRequest.doRequest(BasicHttpRequest.java:190)
        ... 18 more

generated jnlp:
<?xml version="1.0" encoding="UTF-8"?>

<!--
 The contents of this file are subject to the terms
 of the Common Development and Distribution License
 (the "License"). You may not use this file except
 in compliance with the License.
 
 You can obtain a copy of the license at
 glassfish/bootstrap/legal/CDDLv1.0.txt or
 https://glassfish.dev.java.net/public/CDDLv1.0.html.
 See the License for the specific language governing
 permissions and limitations under the License.
 
 When distributing Covered Code, include this CDDL
 HEADER in each file and include the License file at
 glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
 add the following below this CDDL HEADER, with the
 fields enclosed by brackets "[]" replaced with your
 own identifying information: Portions Copyright [yyyy]
 [name of copyright owner]
-->

<jnlp
    spec="1.0+"
    codebase="http://localhost:8080/__JWSappclients/__appclient/ApplicationClient1"
    href="http://localhost:8080/__JWSappclients/__appclient/ApplicationClient1/main.jnlp">
    <information>
        <title>ApplicationClient1</title>
        <vendor>Application Client</vendor>
        <homepage href="/main-jnlp.html"/>
        <description kind="one-line">ApplicationClient1</description>
        <description kind="short">Application description</description>
        
    <offline-allowed/>
    </information>

    <security>
        <all-permissions/>
    </security>
    
    <resources>
        <j2se version="1.5+" />

                <jar href="http://localhost:8080/__JWSappclients/__appserver/aslib/appserv-jwsacc.jar" main="true"/>


<!--
        Refer to the extension main JNLP document (which lists unsigned app server jars) and
        the app client's JNLP document (which lists the user's app client and supporting jars).
-->
        <extension name="mainext" href="main-ext.jnlp"/>
        <extension name="appclient" href="client-client.jnlp"/>

        <!--
            Properties specified on the request as query parameters (if any)
        -->
        

        <property name="javax.xml.parsers.SAXParserFactory" value="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
        <property name="javax.xml.parsers.DocumentBuilderFactory" value="com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
        <property name="javax.xml.transform.TransformerFactory" value="com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl"/>
        <property name="org.xml.sax.parser" value="org.xml.sax.helpers.XMLReaderAdapter"/>
        <property name="org.xml.sax.driver" value="com.sun.org.apache.xerces.internal.parsers.SAXParser"/>

<!-- from the command line -->
        <property name="java.util.logging.manager" value="com.sun.enterprise.server.logging.ACCLogManager"/>
        <property name="javax.enterprise.resource.corba.level" value="FINE"/>
<!--
    The next three properties are set in the appserv-rt.jar's jndi.properties file. Set them
    here so they are detected in the Java Web Start environment.
-->

        <property name="java.naming.factory.initial" value="com.sun.enterprise.naming.SerialInitContextFactory"/>
        <property name="java.naming.factory.url.pkgs" value="com.sun.enterprise.naming"/>

<!--
# Required to add a javax.naming.spi.StateFactory for CosNaming that
# supports dynamic RMI-IIOP.
-->

        <property name="java.naming.factory.state" value="com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl"/>

        <property name="com.sun.aas.jws.iiop.defaultHost" value="localhost"/>
        <property name="com.sun.aas.jws.iiop.defaultPort" value="3700"/>

        

        <property name="com.sun.aas.jws.retainTempFiles" value="false"/>

        <property name="com.sun.aas.jws.isJWS" value="true"/>

        <property name="com.sun.aas.jws.download.host" value="localhost"/>

        <property name="com.sun.aas.user.code.signed" value="true"/>

    </resources>

    <application-desc main-class="com.sun.enterprise.appclient.jws.boot.JWSACCMain">

                <argument>-mainclass</argument>
        <argument>applicationclient1.Main</argument>

        <!--
            Further arguments may be added dynamically.
        -->
        
        
    </application-desc>

</jnlp>



Recall my java is:

jbk_at_trueblue:~$ java -version
java version "1.6.0_0"
IcedTea6 1.3.1 (6b12-0ubuntu6.1) Runtime Environment (build 1.6.0_0-b12)
OpenJDK 64-Bit Server VM (build 1.6.0_0-b12, mixed mode)

and when i went to <install-dir>/domains/domain1/java-web-start/__JWSappclients i couldn't find the __appserver/aslib subdirectory so it's understandable the error is:

 Unable to load resource: http://localhost:8080/__JWSappclients/__appserver/aslib/appserv-jwsacc.jar

however the jar appserv-jwsacc.jar is located at <install-dir>/domains/domain1/java-web-start/appserv-jwsacc.jar. I suppose i could make those directories manually but it would be nice if glassfish could do that as it is supposed to do (or look for the jar in the right place)....
[Message sent by forum member 'jbrkeith' (jbrkeith)]

http://forums.java.net/jive/thread.jspa?messageID=330385