IllegalStateException: No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode in Hibernate

Solution Verified - Updated -

Issue

  • Exception when deploying a persistence unit with an entity with a NamedQuery

    java.lang.IllegalStateException: No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode 
     +-[IDENT] IdentNode: 'NAME' {originalText=NAME}
    
  • The entity is defined as follows:

    @Entity
    @NamedQuery(name = "empName", query = "SELECT NAME FROM EMPLOYEE")
    public class EMPLOYEE {
    @Id
        @Column(name="NAME")
        protected String name;
        ...
    }
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6
  • Hibernate 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content