title: How to get hibernate to print out whats wrong with a named query?
body: <p>In my Spring / Hibernate / JPA application I use a lot of named queries and when I have a typo in one of those queries the see errors in my application start-up log file similar to the one below. </p>
  
  <pre><code>Caused by: org.hibernate.HibernateException: Errors in named queries: FindAllCompanyFileTypes
      at org.hibernate.impl.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:426)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:906)
      ... 70 more
  </code></pre>
  
  <p>How do configure hibernate to print out what is wrong with the named query and not just the named query has an error?</p>
  
  <p><strong>UPDATE</strong> for example the JPA query <code>SELECT f FROM Foo WHERE f.v := true</code> will fail with hibernate complaining that the query is invalid. Hibernate has not even tried to generate SQL from it, the query is not correct JPQL. What I want to know is how to get hibernate to say the query is wrong because := was used instead of = ? not sure if this is a setting that can be turned on in hibernate or not. </p>