users@glassfish.java.net

FileNotFoundException for lib dependency...

From: Steven Siebert <smsiebe_at_gmail.com>
Date: Mon, 3 May 2010 13:35:30 -0400

Hello all,

I have a similar problem I have read about on this mailing list, however, I
have upgraded to the latest GlassFish (which resolved the first issue) and a
new (but seemingly related) issue has come up. When I attempt to deploy my
.ear, which contains .jar libraries with their own dependencies, I get two
FileNotFoundExceptions (attached: fileNotFoundExceptions.txt). Each of the
Exceptions are a result of "nested" dependencies, and not from the
first-level. By this I mean:

centralizedLogger.ear
|__ centralizedLogger.jar (my EJB)
| |__ configuration.jar (deploys fine - this was fixed recently)
| | |__ get_dev-common (exception)
| | |__ javax.persistence.jar (exception - needed because I have
Entity classes in configuration.jar)
| |__ logger.jar
| | |_ javax.persistence.jar (exception - again, have Entity
classes in logger.jar)
| |__ persistence.xml (for both the configuration.jar and logger.jar
Entities)
|__ centralizedLogger.war (nothing significant)

The persistence.xml is working - I can see the Entities being "transformed"
and my tables being created from the DDL annotations (as I requested in the
persistence.xml file). My SLSB's deploy and my application-scoped Singleton
SLSB starts up. Then, I get the lib file dependency problem looking for the
libraries in
C:/glassfishv3/glassfish/domains/domain1/applications/centralizedLogger/lib/lib/get_dev-common.jar
(forgive me, I am forced to work on a Windows box at work).

The javax.persistence.jar file I am referencing is referenced from each
project from the C:/glassfishv3/glassfish/modules/ directory. Shouldn't the
class loader already see this and not need it again?

The deployment is "successful", as they were just warnings, and GlassFish
sets up the standard file system structure under my domain. The application
seems to work fully, as well (LogEvents are being persisted, all SLSB's
deploy and are operational...). If I manually place the jars in the
"expected" place (lib/lib), restart the server, no more complaints.

Obviously, I can just add the libraries to passify the validating
checking...but seems like there is something wrong (especially since
everything is working dispite the warnings during "TLD scanning".

Thanks,

Steve