Java EE 6 imposes stricter JAR visibility rules than did Java EE 5. As a result, some older applications might fail.
The Java EE 6 specification imposes strict rules about which JAR files are visible from an enterprise archive (EAR) file. See especially section EE.8.3.3. Specifically, application client modules should not have access to any EJB JAR file unless the application client JAR file's manifest Class-Path refers to the EJB JAR file(s) explicitly.
This is a change from Enterprise Server v2, in which application clients automatically had access to all EJB JAR files in the EAR file and all JAR files at the top level of the EAR file. To comply with the stricter specification language, Enterprise Server v3 cannot automatically provide application clients with access to these JAR files.
This new, stricter behavior imposed by Java EE 6 can be addressed as follows:
If the application is deployed to an Enterprise Server v2 domain, Upgrade Tool will preserve the Enterprise Server v2 behavior for that application in that domain. For more information about upgrading, see Sun GlassFish Enterprise Server v3 Upgrade Guide.
Change the manifest Class-Path of the client so it refers explicitly to the JAR files on which it depends. The Class-Path must not list JAR files in the EAR file's library directory. As required by the specification, all JAR files in that directory are available to all modules in the EAR file. This directory is /lib by default, or can be set to some other directory using library-directory in the application.xml descriptor.
Deploy the EAR file using the optional --property compatibility=v2 setting. This preserves the Enterprise Server v2 behavior for that application when it is deployed to Enterprise Server v3.
This change in behavior is also discussed in Chapter 1, Application Server Compatibility Issues, in Sun GlassFish Enterprise Server v3 Upgrade Guide.