title: empty dataTable, Maven JPA JSF
body: <p>I have a Maven project with JSF framework.I want to extract data from the database to dataTable. But I don't extract. I will share my codes. But these codes works correctly normal Jsf web application (not maven).</p>
  
  <blockquote>
    <p>It is jpa controller class</p>
  </blockquote>
  
  <pre><code>public class usersController {
  
  EntityManager em;
  EntityManagerFactory emf;
  private List&lt;Users&gt; users = new ArrayList&lt;&gt;();
  
  public usersController() {
      emf = Persistence.createEntityManagerFactory("com.ozgur_MavenJSF_war_1.0-SNAPSHOTPU");
      em = emf.createEntityManager();
      em.getTransaction().begin();
  }
  
  public List&lt;Users&gt; getUsers() {
      try {
          users = em.createNamedQuery("Users.findAll", Users.class).getResultList();
          return users;
      } catch (Exception e) {
          return users;
      }
  }
  }
  </code></pre>
  
  <blockquote>
    <p>It is Managed Beans class</p>
  </blockquote>
  
  <pre><code>@Named(value = "usersBeans")
  @SessionScoped
  public class usersBeans implements Serializable {
  
      private List&lt;Users&gt; users = new ArrayList&lt;&gt;();
      private usersController userController = new usersController();
  
      public usersBeans() {
      }
  
      public List&lt;Users&gt; getAll() {
          users = userController.getUsers();
          return users;
      }
  }
  </code></pre>
  
  <blockquote>
    <p>It is xhtml file</p>
  </blockquote>
  
  <pre><code>&lt;h:form&gt;
      &lt;h:dataTable value="#{usersBeans.getAll()}" var="users"&gt;
          &lt;h:column&gt;                  
              &lt;f:facet name = "header"&gt;Id&lt;/f:facet&gt;                   
                  #{users.id}
          &lt;/h:column&gt;
  
          &lt;h:column&gt;
              &lt;f:facet name = "header"&gt;Name&lt;/f:facet&gt;
                  #{users.userName}
          &lt;/h:column&gt;
  
          &lt;h:column&gt;
              &lt;f:facet name = "header"&gt;Surname&lt;/f:facet&gt;
                  #{users.userSurname}
          &lt;/h:column&gt;
  
          &lt;h:column&gt;
              &lt;f:facet name = "header"&gt;Address&lt;/f:facet&gt;
                  #{users.userAddress}
          &lt;/h:column&gt;
          &lt;h:column&gt;
              &lt;f:facet name = "header"&gt;Phone&lt;/f:facet&gt;
                  #{users.userPhone}
          &lt;/h:column&gt;
      &lt;/h:dataTable&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <blockquote>
    <p>persistence.xml is correct</p>
  </blockquote>
  
  <p><strong>In xhtml file, <code>&lt;h:dataTable value="#{usersBeans.getAll()}" var="users"&gt;</code> Even If I write something ridiculous in value, it does not give an error. I just see an empty table. But these codes works correctly normal Jsf Web app.</strong></p>
  
  <p>Thank you in advance for your help.</p>