title: java.lang.IllegalArgumentException: The FROM clause of the query does not declare an identification variable [foo]
body: <pre><code>Caused by: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager: 
  Exception Description: Error compiling the query [select t from Utilisateur t where LOGIN='' and PASSWORD=''], line 1, column 34: unknown identification variable [login]. The FROM clause of the query does not declare an identification variable [login].
      at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1477)
      at ejbservice.GestionUtulisateur.authentification(GestionUtulisateur.java:79)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  </code></pre>
  
  <p>what is my error please help me and this is my method  </p>
  
  <pre><code>public boolean authentification(String login, String password) {
       String a = "select t from Utilisateur t where LOGIN='"+login+"' and PASSWORD='"+password+"'";
       EntityManagerFactory emf = Persistence.createEntityManagerFactory("ProjetPU");
       EntityManager em = emf.createEntityManager();
       Query query = em.createQuery(a);
       List &lt;Utilisateur&gt; Loaded = query.getResultList();
       if ((Loaded.size())==0 ){
           return false ;
       } else {
           return true;
       }
  }
  </code></pre>