I have seen all the issues noticed in this forum, but I still don't have any solution for my problem. I work on a EAR project with Maven, Wildfly and JBoss. When I try to browse to my resource I have NPE. This is my JAX activator class:
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("/resource")
public class JaxRsActivator extends Application{
}
and this is my resource class:
@Path("/drivers")
public class DriverResource {
@Inject DriverCpoServiceLocal driverCpoServiceLocal;
@GET
@Produces(MediaType.APPLICATION_JSON)
public List<DriverCpo> doFindAllDrivers(){
return driverCpoServiceLocal.findAll();
}
}
This code works correctly on my personal computer, but in the work computer I see the NPE. It is driving me crazy.