title: How to test JPA queries?
body: <p>I'm developing a website with JSF with JPA.
  So I configure a DataSource in my Glassfish instance and in my project too.</p>
  
  <p>But I wonder, how can I test my JPA queries in Eclipse ?</p>
  
  <p>In Netbeans, for example, you just have to do a right-click on the <code>hibernate.cfg</code> file and <em>"Run HQL queries"</em> (translating)
  There's something like this in Eclipse ?</p>
  
  <p><strong>UPDATE:</strong>
  Following the comments I install the Hibernate Tools then try to use the HQL Editor, but gives me this strange error below :</p>
  
  <p><img src="https://i.stack.imgur.com/1oLhb.jpg" alt="configuration"></p>
  
  <p><img src="https://i.stack.imgur.com/yvwZn.jpg" alt="error"></p>
  
  <p>Any idea how can I solve this ?</p>
  
  <p>Just to make myself clear, this is my JPA configuration :
  <img src="https://i.stack.imgur.com/5xLft.jpg" alt="enter image description here"></p>
  
  <p><strong>UPDATE 2:</strong>
  I did what @kenChan recommend but it seems that I have one error left: (I didn't know that I have to put the MySQL driver in the classpath, in Hibernate Tools configuration, tkanks KenChan.)</p>
  
  <p><img src="https://i.stack.imgur.com/Z37sZ.jpg" alt="enter image description here">
  The error:
  <img src="https://i.stack.imgur.com/1qvKt.png" alt="enter image description here"></p>
  
  <p><strong>UPDATE 3:</strong>
  @KenChan I tried to create a property file (I found a similar problem topic <a href="https://forum.hibernate.org/viewtopic.php?p=2400465" rel="nofollow noreferrer">here</a>) but still gives the same error:</p>
  
  <p><img src="https://i.stack.imgur.com/ubWYM.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/WH2xh.jpg" alt="enter image description here"></p>
  
  <p><strong>UPDATE 4:</strong>
  IT WORKS!</p>
  
  <p>I was missing one 's' in the end of this line:</p>
  
  <pre><code>hibernate.connection.provider_class
  </code></pre>
  
  <p>In the end my hibernate.properties stay this way:</p>
  
  <pre><code>hibernate.connection.password=***********
  hibernate.connection.username=*******
  hibernate.connection.driver_class=com.mysql.jdbc.Driver
  hibernate.dialect=org.hibernate.dialect.MySQLDialect
  hibernate.connection.url=jdbc\:mysql\://********\:3306/********
  hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider
  hibernate.datasource=
  hibernate.transaction.manager_lookup_class=
  hibernate.cache.use_query_cache=false
  </code></pre>
  
  <p>Thank you @KenChan by your support.</p>