title: Jetty+Jersey servlet+Weld: Weld injection not initialized, what is wrong?
body: <p>I'm trying to migrate from Glassfish+Jersey+Weld to Jetty.</p>
  
  <p>I have such a setup: <a href="https://gist.github.com/2961967" rel="nofollow noreferrer">gist of pom.xml, web.xml and Java launcher</a>.</p>
  
  <p>Application seems to start fine, but when serving any request I see that the field that should be injected by Weld (<code>logger</code>) is null.</p>
  
  <pre><code>@RequestScoped
  @Path("/foobar")
  @Consumes({ ExtendedMediaType.APPLICATION_JSON, 
      ExtendedMediaType.APPLICATION_JAVASCRIPT })
  @Produces({ ExtendedMediaType.APPLICATION_JSON, 
      ExtendedMediaType.APPLICATION_JAVASCRIPT })
  public class EmailResource extends {
  
      @Inject
      private Logger logger;
  
      @Override @POST
      public Response create(EmailJob document) 
          throws URISyntaxException, ResourceException 
      {
         logger.debug("Hi there!");
      }
  }
  </code></pre>
  
  <p>What is the problem?</p>
  
  <p><strong>update:</strong> Logger producer looks dubious, but it doesn't even get called:</p>
  
  <pre><code>/** This class uses CDI to alias Java EE resources into CDI beans. **/
  public class Resources {
  
      @Produces
      public Logger produceLog(InjectionPoint injectionPoint) {
          return LoggerFactory.getLogger(
              injectionPoint.getMember().getDeclaringClass().getName());
      }
  }
  </code></pre>