title: How to inject an interface implementation?
body: <p>I have the following interface </p>
  
  <pre><code>public interface IMyMapper&lt;T&gt; {}
  </code></pre>
  
  <p>and the implementation</p>
  
  <pre><code>public class MyMapper implements IMyMapper&lt;MyClazz&gt; {}
  </code></pre>
  
  <p>Now I want to inject the class <code>MyMapper</code> into a Stateless bean:</p>
  
  <pre><code>@Stateless
  public class MyService {
  
      @Inject
      MyMapper mapper; //&lt;-- does not work
  
      @Inject
      IMyMapper&lt;MyClazz&gt; mapper; //&lt;-- also does not work
  }
  </code></pre>
  
  <p>My problem is that the injection does not work. I get an exception:</p>
  
  <pre><code>org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies    for type MyMapper with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject mypackage.MyService.mapper
  at mypackage.MyService.mapper(MyService.java:0)
  
  at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:370)
  at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:291)
  at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
  at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:165)
  at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:529)
  at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:515)
  at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:490)
  at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:419)
  at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:90)
  at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:225)
  at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
  at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
  at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
  at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
  at java.security.AccessController.doPrivileged(Native Method)
  at javax.security.auth.Subject.doAs(Subject.java:360)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
  at java.security.AccessController.doPrivileged(Native Method)
  at javax.security.auth.Subject.doAs(Subject.java:360)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
  at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
  at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
  at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597)
  at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484)
  at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412)
  at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403)
  at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
  at java.util.TimerThread.mainLoop(Timer.java:555)
  at java.util.TimerThread.run(Timer.java:505)
  ]]
  </code></pre>
  
  <p>How can I solve this?</p>