Tuesday, January 27, 2015

No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode \-[IDENT] IdentNode: 'e' {originalText=e}

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: No data type for node: org.hibernate.hql.internal.ast.tree.IdentNode 
 \-[IDENT] IdentNode: 'e' {originalText=e}

HQL query:
Query query = session.createQuery("SELECT e FROM Employee");

Problem: 
In the above query, 'e' alias name is given in Employee table.

Solution: 
Query query = session.createQuery("SELECT e FROM Employee e");

0 comments: