首页 > Java开发 > 错误:java.lang.IllegalArgumentException: node to traverse cannot be null!

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

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)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
at com.cqa.core.common.dao.EntityDaoImpl.findPage(EntityDaoImpl.java:154)
at com.cqa.service.vip.znx.ZnxServiceImpl.findMemberMail(ZnxServiceImpl.java:10)
at com.cqa.service.vip.znx.ZnxServiceImpl$$FastClassByCGLIB$$b3302b8d.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:714)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:162)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:652)
at com.cqa.service.vip.znx.ZnxServiceImpl$$EnhancerByCGLIB$$6bde40b5.findMemberMail(<generated>)
at com.cqa.action.vip.znx.VipZnxAction.loadMemberMail(VipZnxAction.java:41)
at com.cqa.action.vip.znx.VipZnxAction.show(VipZnxAction.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

解决方法:

通常此类错误都是由于HQL语句写的不正确,例如from写成了form

仔细检查HQL语句


本文固定链接: http://www.devba.com/index.php/archives/283.html | 开发吧

错误:java.lang.IllegalArgumentException: node to traverse cannot be null!:目前有2 条留言

  1. 沙发
    tom:

    这个问题真是我粗心了。谢谢!

    2013-05-10 下午 11:53
    • 孤风一剑:

      呵呵,细心点就好。

      2013-05-14 上午 11:01