java.lang.IllegalArgumentException: node to traverse cannot be null!

錯誤日志:

严重: >>java.lang.IllegalArgumentException: node to traverse cannot be null! >> at org.hibernate.hql.ast.util.NodeTraverser.traverseDepthFirst(NodeTraverser.java:31) >> at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:254) >> at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157) >> at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) >> at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77) >> at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56) >>...

錯誤原因:

      通常此类错误都是由于HQL语句写的不正确,例如from写成了form,或者set A = 1 and B = 2,其中set不同字段用逗号","分离而不是用and.总之仔细检查HQL语句,看看有没有语法错误即可.

参考:

      http://geeklondon.com/blog/view/pesky-syntax

     

你可能感兴趣的:(null)