title: Basic HQL statement always fails
body: <p>I've recently started trying to use Hibernate, but am doing so in Netbeans.  This has left me having to use <a href="http://netbeans.org/kb/docs/web/hibernate-webapp.html#06" rel="nofollow noreferrer">this example project</a> to try and get me up and running.</p>
  
  <p>Unfortunately, at the step <em>"Enumerating Film Titles and Retrieving Actors Using an HQL Query"</em> my HQL queries do not give results and instead fail, with the exception:</p>
  
  <pre><code>org.hibernate.exception.SQLGrammarException: could not execute query
  Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from limit 100' at line 1
  </code></pre>
  
  <p>It seems that the HQL isn't generating proper MySQL statements but I can't seem to see why, as I've followed the example to the letter thus far.</p>
  
  <p>I am attempting to connect to a local MySQL database named 'sakila', with the following details:</p>
  
  <pre><code>jdbc:mysql://localhost:3306/sakila
  </code></pre>
  
  <p>which seems to work correctly as I am able to browse the tables from within Netbeans no problem.</p>
  
  <p>My hibernate.cfg.xml is as follows: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;  
  &lt;!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt;  
  &lt;hibernate-configuration&gt;  
    &lt;session-factory&gt;  
      &lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.MySQLInnoDBDialect&lt;/property&gt;  
      &lt;property name="hibernate.connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;  
      &lt;property name="hibernate.connection.url"&gt;jdbc:mysql://localhost:3306/sakila&lt;/property&gt;  
      &lt;property name="hibernate.connection.username"&gt;root&lt;/property&gt;  
      &lt;property name="hibernate.show_sql"&gt;true&lt;/property&gt;  
      &lt;property name="transaction.factory_class"&gt;org.hibernate.transaction.JDBCTransactionFactory&lt;/property&gt;  
      &lt;property name="hibernate.current_session_context_class"&gt;thread&lt;/property&gt;  
      &lt;property name="hibernate.query.factory_class"&gt;org.hibernate.hql.classic.ClassicQueryTranslatorFactory&lt;/property&gt;  
      &lt;mapping resource="dvdrental/Language.hbm.xml"/&gt;  
      &lt;mapping resource="dvdrental/FilmActor.hbm.xml"/&gt;  
      &lt;mapping resource="dvdrental/FilmCategory.hbm.xml"/&gt;  
      &lt;mapping resource="dvdrental/Category.hbm.xml"/&gt;  
      &lt;mapping resource="dvdrental/Film.hbm.xml"/&gt;  
      &lt;mapping resource="dvdrental/Actor.hbm.xml"/&gt;  
    &lt;/session-factory&gt;  
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>When I'm using the HQL Query window, the SQL it seems to generate only ever says 'select  from ' which is obviously wrong, but I can't see why this is being caused?</p>
  
  <p><strong>Edit 1:</strong> The HQL Query tab showing my input </p>
  
  <p><img src="https://i.stack.imgur.com/Pkuvo.png" alt="Image showing HQL Query tab"></p>