1 Reply Latest reply on Nov 12, 2012 1:47 PM by jianinz

    @Context Entity injection failed, thus failed to deploy jersey service war

    jianinz

      Hi Guys,

       

      I am newbie in arquillian integration test, i recently encountered a problem which i couldn't figure it out why for quite a while, some help would be really appreciated

       

      I tried to deploy jersey rest service war into embeded glassfish, but i got the following message

       

      Nov 12, 2012 1:30:59 PM com.sun.jersey.spi.inject.Errors processErrorMessages

      SEVERE: The following errors and warnings have been detected with resource and/or provider classes:

        SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.api.purchase.PurchaseResource.getPurchase(com.ejb.entity.User,java.lang.Long) at parameter at index 0

        SEVERE: Method, public javax.ws.rs.core.Response com.api.purchase.PurchaseResource.getPurchase(com.ejb.entity.User,java.lang.Long), annotated with GET of resource, class com.api.purchase.PurchaseResource, is not recognized as valid resource method.

        SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.api.purchase.PurchaseResource.sendPaymentEmail(javax.servlet.http.HttpServletRequest,com.ejb.entity.User,java.lang.Long,java.lang.String,java.lang.String,java.lang.String) at parameter at index 1

        SEVERE: Method, public javax.ws.rs.core.Response com.api.purchase.PurchaseResource.sendPaymentEmail(javax.servlet.http.HttpServletRequest,com.ejb.entity.User,java.lang.Long,java.lang.String,java.lang.String,java.lang.String), annotated with GET of resource, class com.api.purchase.PurchaseResource, is not recognized as valid resource method.

       

       

      Exception goes here:

       

      SEVERE: WebModule[/mobile]StandardWrapper.Throwable

      com.sun.jersey.spi.inject.Errors$ErrorMessagesException

                at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170)

                at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:136)

                at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:199)

       

       

      index 0 is the parameter where @Context CDI injected, i have no problem that other injection works perfectly

       

      Any ideas?

       

      NB: I have beans.xml defined.

       

       

      Cheers,

      Jianing