users@glassfish.java.net

Trouble deploying .war with CDI enabled jars using Glassfish Embedded 3.1.

From: <forums_at_java.net>
Date: Tue, 10 May 2011 13:38:25 -0500 (CDT)

Hi,

I'm having trouble getting a .war to deploy to Embedded Glassfish 3.1.  I'm
using Maven with the embedded-glassfish-maven-plugin.  My .war is packaged
like this:

WEB-INF/web.xml WEB-INF/beans.xml (do I actually need this if my classes
don't include any producers?) WEB-INF/classes/* WEB-INF/lib/some-api
WEB-INF/lib/some-impl (implements some-api, CDI enabled, @Produces
implementations of some-api interfaces) WEB-INF/lib/ejb-lite (module with no
interface EJBs, injects interfaces from some-api)
When I use 'embedded-glassfish:run' to run the embedded server and deploy my
.war, I get the following type of error:

Exception while loading the app : WELD-001408 Unsatisfied dependencies for
type...etc...
If I deploy the exact same .war to a standalone Glassfish 3.1 server, it
works.  If I repackage everything as a .ear, it works.  If I comment out
every occurance of @Inject in my ejb-lite module, I don't get deployment
errors (obviously nothing works though).  Some questions...

 

Is there something that could be causing WELD to miss my 'some-impl' module?
 Is the embedded version of Glassfish based off exactly the same build as
the standalone version?  How do CDI enabled .jars get scanned?  Is there
any way I can see what resources are getting scanned and what order they're
getting scanned in?  Does anyone know how to enable debug logging when using
the embedded-glassfish-maven-plugin?

 

Thanks in advance for any help.


--
[Message sent by forum member 'toomanyryans']
View Post: http://forums.java.net/node/800897