title: hibernate named query error after updating to hibernate 5.0.7 and jpa 2.1
body: <p>I have very simple named query that use to work before update but now I am getting runtime error.</p>
  
  <p>this is the named query :</p>
  
  <pre><code>@Entity
  @Table(name="FRA_HIER_NODE_TYPE", schema="FRA_DATA")
  @NamedQuery(name="NodeType.FetchNodeTypes", query="FROM NodeType")
  public class NodeType {
  ...
  </code></pre>
  
  <p>The exception i see : </p>
  
  <pre><code>Caused by: org.hibernate.HibernateException: Errors in named queries: NodeType.FetchNodeTypes
      at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:493)
      at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:708)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724)
      at org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:416)
      at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:401)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
      ... 25 more
  </code></pre>