title: @Inject gives null Object
body: <p>I have these two classes and want to use the method of MyData to insert data in MyBean.</p>
  
  <pre><code>@Named
  @RequestScoped
  public class MyBean implements Serializable {
  
      @Inject
      private MyData myData;
  
      public MyBean() {
          // NullPointerException, because myData is null
          this.dataList = myData.method();
      }
  ...
  }
  
  @Singleton
  class MyData {
      method(){
          ...
      }
  }
  </code></pre>
  
  <p>MyData on the other Hand injects a controller class myHandler:</p>
  
  <pre><code>@Singleton
  public class myHandler {...}
  </code></pre>
  
  <p>I keep getting error messages, that <code>myData.method()</code> is null and have no idea about it. Maybe I haven't fully understood what CDI injection means?</p>
  
  <p>Edit:
  These are the fully qualified annotations.</p>
  
  <pre><code>import javax.ejb.Singleton;
  import javax.enterprise.context.RequestScoped;
  import javax.inject.Inject;
  import javax.inject.Named;
  </code></pre>
  
  <p>Edit2: The container used is a wildfly 11. Since I use Maven too, there is not much I could do wrong with my project structure because I have to follow the Maven rules. 
  As I mentioned before, the server works fine for crud operations on my database, where I used CDI and JSF before. I just added MyBean and MyData to my project.
  I tried <code>@Startup</code>, results have not changed. </p>
  
  <p>Edit3: I don't think it's a duplicate because I tried to use <code>@DependsOn()</code> annotation and still get null back. The NullException doesn't come from the bean but from JavaScript, where I want to insert a String with JSF later being processed to a chart. The stacktrace says, that this function passes null value to the member variable in the contructor of the bean.</p>