users@glassfish.java.net

Re: Clustering Concepts

From: <glassfish_at_javadesktop.org>
Date: Wed, 23 Jul 2008 17:05:25 PDT

Is the JAR you are specifying one that you created? Or is it what GlassFish returns with the

asadmin deploy ... --retrieve

command or the

asadmin get-client-stubs

command?

I'm assuming it's one you create yourself which should be fine.

The error suggests - perhaps not as clearly as it might - that the file you specified seems to be a valid JAR but that the ACC does not recognize it as either an app client JAR file or the retrieved JAR from one of the two commands shown above (which for internal reasons happens to be in EAR format).

The ACC uses some utility classes to work with the client JAR file, and these utilities try to determine what type of archive has been provided. They use the presence of a descriptor in the archive or, in the case of an app client, also the existence of a Main-Class setting in the JAR's manifest. It seems that the JAR file you are using does not have an application-client.xml or sun-application-client.xml file in its META-INF directory nor does it set Main-Class in the manifest.

You might argue that by specifying -mainclass on the appclient command you are telling the ACC what it needs to know, but the archive-type detection logic runs before the mainclass argument is processed, so in your case it does not recognize the archive type and complains.

Can you arrange to set the Main-Class entry in the JAR's manifest and see if that helps?

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

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