users@glassfish.java.net

Re: glassfich deployment problems

From: <glassfish_at_javadesktop.org>
Date: Sun, 28 Sep 2008 08:47:24 PDT

A little background first - not necessarily for you since you seem to understand how JARs can depend on other JARs - but for other readers as well. Java allows a JAR to declare that it depends on one or more other class libraries by listing those dependencies in the manifest of the JAR file. One way to do this is in the Class-Path entry in the manifest. Another way is for the manifest to list what are called optional packages or extensions, by name and (optionally) version. There can be chains of this kind of dependency, in which JAR A depends on JAR B which depends on JAR C. An application that depends on A will not be able to run unless B and C are also available to the Java runtime.

GlassFish also implements this same support for Java EE applications in very much the same ways. Often a JAR listed in the Class-Path of another JAR's manifest is typically bundled with the application itself. Optional or extension JARs are placed either in the domain's lib/ext directory, the GlassFish installation directory's lib/ext directory, or the lib/ext directory of the Java runtime that you have GlassFish using.

The messages are telling you that one of the JAR files in your application or that your applicaiton depends on declares a dependency on an optional package which GlassFish cannot find. You might have declared this dependency in, for example, your EJB module. Or perhaps you have bundled a JAR into your application that has this kind of dependency. In any case you need to understand the dependencies among the JARs in your application and among the JARs which your app depends on. You need to make sure you satisfy all these dependencies by placing the referenced optional packages in the correct places.

If you supply the correct JARs in the correct places you should be able to solve your problem.

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

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