I created an Enterprise Application Project that points to a Dynamic Web
Project and a standard Java Project. The Dynamic Web Project depends on
the standard Java Project. The standard Java Project depends on Hibernate
via a User Library. When I deploy the Enterprise Application Project to
Glassfish, I expected that all the dependendcies would be ear'd up,
including Hibernate (even though it was specified in a User Library).
Only the war file for the Dynamic Web Project and the jar file for the
standard Java Project ended up being ear'd.
What do you have to do to get User Libraries ear'd up? Or can that even
be done?
This configuration should work. The first thing to check is whether the
EAR composition is correct when you export an EAR using the export EAR
wizard.
If the export wizard produced a correct EAR, then there is a bug in the
Glassfish server adapter.
If the export wizard did not produce a correct EAR, then we need to check
your configuration further. Do you see any warnings in the problems view?
WTP will flag classpath entries that are likely to be necessary, but are
not marked for deployment. If you find such warnings that refer to your
user library, you can access quick fixes that will let you properly tag
it. If you cannot find the warnings, you can also go to your java
project's project properties. In the Java EE Module Dependencies page, you
should see you user library listed. Check the checkbox next to it.
After I wrote this yesterday, I found the Java EE Module Dependencies and
checked the libraries. Thank you for your help.
Konstantin Komissarchik wrote:
> This configuration should work. The first thing to check is whether the
> EAR composition is correct when you export an EAR using the export EAR
> wizard.
> If the export wizard produced a correct EAR, then there is a bug in the
> Glassfish server adapter.
> If the export wizard did not produce a correct EAR, then we need to check
> your configuration further. Do you see any warnings in the problems view?
> WTP will flag classpath entries that are likely to be necessary, but are
> not marked for deployment. If you find such warnings that refer to your
> user library, you can access quick fixes that will let you properly tag
> it. If you cannot find the warnings, you can also go to your java
> project's project properties. In the Java EE Module Dependencies page, you
> should see you user library listed. Check the checkbox next to it.
Konstantin Komissarchik wrote:
> If the export wizard produced a correct EAR, then there is a bug in the
> Glassfish server adapter.
I know I'm a bit late but I'd like to clarify this. If the export wizard
produced a correct EAR, the bug could be in the Glassfish server
adapter, but is also quite likely to be somewhere in the module factory
and module delegate for the JEE projects ;)
There have been a myriad of bugs in that area lately which we're trying
very hard to fix.