users@glassfish.java.net

Re: Standalone client of GlassFish v3

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Wed, 10 Mar 2010 10:17:54 +0100

2010/3/10 <glassfish_at_javadesktop.org>:
> Hi,
>
> The "java -jar HelloApp-std-client.jar" command is correct because the MANIFEST.MF contains the Class-Path.
>
> One library that I made for the standalone mode and called it "SunGFv3" is contained these jars:
>  acc-config.jar
>  gf-client.jar
>  gf-client-module.jar
>  gf-connectors-connector.jar
>  gf-ejb-connector.jar
>  gf-jruby-connector.jar
>  gf-web-connector.jar
>
> Here is the code, environment and the result what you ask from me.
>
> Attila.

Try this: get rid of all the above JARs from MANIFEST.MF and launch
application with:

GF_LIB=/path/to/gf3/glassfish/modules
java -cp $GF_LIB/gf-client.jar -jar HelloApp-std-client.jar

and see if that works. The problem with Glassfish v3 client JARs is
that one JAR references another, the another references dozen others
and those others bla bla bla....
So, pointing to gf-client.jar in Glassfish v3 directory is not the
same as copying that file to another location, because that one tiny
gf-client.jar references dozens of another tiny JARs in relative
locations.

Just take a look at gf-client.jar's manifest:
unzip -p gf-client.jar META-INF/MANIFEST.MF
you will see the real hell :/