I have a web service that's defined like this:

@StreamingAttachment(parseEagerly = true, memoryThreshold = 40000L)
@Stateless()
@MTOM
@XmlSeeAlso({ArrayList.class, ModelList.class})
@Interceptors({MethodInterceptor.class})
@HandlerChain(file = "handlers.xml")
@WebService(name = "NhinInterfaceWS", serviceName = 
"NhinInterfaceWSService", targetNamespace = "http://ejb.app.company.com/";)
@GuiceManaged(module = EjbProvider.class)
public class NhinInterfaceWS implements NhinInterfaceWSLocal {

...

    @Inject
    ProviderGroupsUserIsIn providerGroupsUserIsIn;

...


But whenever that providerGroupsUserIsIn is used, the app throws a null 
pointer exception.  I'm using com.google.inject.Inject to @Inject the 
annotation.  

Here's my EjbProvider:

public class EjbProvider extends AbstractModule {

....

    @Override
    protected void configure() {
        bind(ProviderGroupsUserIsIn.class); //I believe this should be 
unnecessary, but I still get the problem if I remove this line.
    }

I'm using Glassfish 3.1.2 and guicemanaged-0.5.  I don't see any errors on 
startup and - other than guice not working - I can call my web services 
fine.  The documentation on how to use GuiceManaged is pretty straight 
forward, so I don't know where I could have made a mistake.  Does 
guicemanaged assume I'm not using other kinds of configuration files?  I'm 
using a sun-ejb-jar.xml for all my web services.

FWIW, I've got guice working correctly with Jersey 1.x and it's using this 
same EjbProvider, so I don't think that's where the problem lies.  

-- 
CONFIDENTIALITY NOTICE: The information contained in this electronic 
transmission may be confidential. If you are not an intended recipient, be 
aware that any disclosure, copying, distribution or use of the information 
contained in this transmission is prohibited and may be unlawful. If you 
have received this transmission in error, please notify us by email reply 
and then erase it from your computer system.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/d/optout.

Reply via email to