users@glassfish.java.net

Re: Unable to launch Glassfish v3 app client via Java Web Start

From: <glassfish_at_javadesktop.org>
Date: Thu, 18 Mar 2010 13:45:38 PDT

Hi Tim,

Yes, I'm back in the fray again - this time with GF v3 ! I have ported the previous application which was running on GF v2.1.1 to GF v3, and modified the code so that it uses all the goodness of EJB 3.1. The old application eventually did not have any app clients in it, but I decided to put a very small one in the new version.

OK, basically this was the first ever app client that had ever been run on the machine. But I went in and cleared the JWS cache, and also made sure that the EAR was undeployed, stopped Glassfish, made sure all the generated stuff for the application had been deleted from the domain, reboot the computer, restarted Glassfish, redeployed the EAR, and got exactly the same results.

On different Linux machine (same latest available version of GF v3 of 17th, and Sun Java 1.6.0_16), I then did the same, and also got the same result, and finally, on a Windows XP machine (Sun Java 1.6.0_18), and also finished with exactly the same result again. So I would kind of think it is not actually something on my one machine.

I am including the entire JNLP launch file as reported by the JWS dialog here (less all the copyright verbiage and stuff) :-

<jnlp
    spec="1.0+"
    codebase="http://localhost:8080/___JWSappclient/___app/Suprima"
    href="___dyn/SuprimaBootstrap.jarClient/___main.jnlp">
    <information>
        <title>SuprimaBootstrap</title>
        <vendor>Application Client</vendor>
        <homepage href="${appclient.information.homepage.filepath}"/>
        <description kind="one-line">SuprimaBootstrap</description>
        <description kind="short">SuprimaBootstrap</description>
        
    <offline-allowed/>
    </information>

    <security>
        <all-permissions/>
    </security>

    <resources>
        
<!-- <java version="1.6+"
             java-vm-args="-showversion -javaagent=glassfish/modules/gf-client.jar=mode=jws,${agent.args} " /> -->
        <java version="1.6+" java-vm-args="" />
        
        <!--
            In v3, run the client facade as the main JAR. Eventually Java Web
            Start might support the splash screen in the JAR.
        -->
        <jar href="SuprimaClient/SuprimaBootstrapClient.jar" main="true" />
        
        <!--
            If the client is part of an EAR then there will be an EAR-level
            generated facade JAR file.
        -->
        <jar href="SuprimaClient.jar"/>

        <!--
            These next JARs will have been signed using the
            deployer-specified alias, if specified, or the default domain alias.
            Note that even though these are fetched within the code base of the
            app, we do not sign these once for each app but reuse ones
            signed with the same alias.
        -->
        <jar href="glassfish/modules/gf-client.jar"/>
        <jar href="glassfish/modules/gf-client-module.jar"/>

        <!--
            Refer to extension JNLP documents which list other resources - JARs and JNLPs.

            The system extension lists the JARs that are common to all apps. The
            facade extension lists the generated facade JAR file for the client.
            The client extension lists the client JAR. The library extension
            lists JARs from the EAR application to which the client directly
            or indirectly refers.
        -->
        <extension name="___system" href="http://localhost:8080/___JWSappclient/___system/___dyn/___system.jnlp"/>
        <extension name="___client" href="___dyn/SuprimaBootstrap.jarClient/___client.jnlp"/>

        <extension name="libJars-s1as" href="___lib/client-libs-s1as.jnlp"/>

        <property name="appclient.system.codebase" value="http://localhost:8080/___JWSappclient/___system"/>
        <property name="appclient.is.jws" value="true"/>

        <property name="agent.args" value="mode=jws,client=url=http://localhost:8080/___JWSappclient/___app/Suprima/SuprimaClient/SuprimaBootstrapClient.jar,arg=-targetserver,arg=localhost:3700"/>

        <property name="client.facade.jar.path" value="SuprimaClient/SuprimaBootstrapClient.jar"/>
        <property name="full.app.codebase.path" value="http://localhost:8080/___JWSappclient/___app/Suprima"/>
        <!--
            Properties specified on the request as query parameters (if any)
        -->
        

        <!--
            Content normally read from files during an appclient script launch.
        -->
        <property name="sun-acc.xml.content" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;


My observations here is that the bits of importance are :-

        <jar href="SuprimaClient/SuprimaBootstrapClient.jar" main="true" />
        <jar href="SuprimaClient.jar"/>
        <property name="agent.args" value="mode=jws,client=url=http://localhost:8080/___JWSappclient/___app/Suprima/SuprimaClient/SuprimaBootstrapClient.jar,arg=-targetserver,arg=localhost:3700"/>
        <property name="client.facade.jar.path" value="SuprimaClient/SuprimaBootstrapClient.jar"/>
        <property name="full.app.codebase.path" value="http://localhost:8080/___JWSappclient/___app/Suprima"/>


The first two lines of the tag <jar href should surely be :-
        <jar href="Suprima/SuprimaBootstrapClient.jar" main="true" />
        <jar href="SuprimaBootstrapClient.jar"/>

while the I would expect the property "client.facade.jar.path" to have a value of "Suprima/SuprimaBootstrapClient.jar", instead of what it is.

Just as an additional side-show, on deployment, the server log also shows a couple of other errors before declaring that it has deployed the app client as in :-
INFO: ACDEPL103: Java Web Start services started for the app client Suprima/SuprimaBootstrap.jar (contextRoot: /Suprima/SuprimaBootstrap)

These two similar errors are related to two additional library jars that are supposed to included with the app client (let's call them lib1.jar and lib2.jar). They are :-
WARNING: ACDEPL112: Error attempting to process extensions from the manifest of JAR file /home/steve/glassfishv3/glassfish/domains/domain1/applications/Suprima/lib1.jar; ignoring it and continuing
java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:114)
        at java.util.jar.JarFile.<init>(JarFile.java:133)
        at java.util.jar.JarFile.<init>(JarFile.java:97)
        at org.glassfish.appclient.server.core.jws.ExtensionFileManager.findExtensionTransitiveClosure(ExtensionFileManager.java:264)
        at org.glassfish.appclient.server.core.jws.JavaWebStartInfo.processExtensionReferences(JavaWebStartInfo.java:331)
  and a similar one for lib2.jar, basically because these two library jars are indeed, not to be found where the code is thinking they are.

Regards,

Steve.
[Message sent by forum member 'suttridge_farm']

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