node to traverse cannot be null!

今天再用ssh整个网络商城的时候遇到了这样一个问题:


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

经过一番百度之后,说是,这是由于使用hibernate 中

的HQL做查询时出现了空返回值的错误,很有可能HQL语句本身就写错了

经过仔细排查,发现是自己的hql语句打错了一个单词,

String hql = "form CategorySecond order by csid desc";

改过之后:String hql = "from CategorySecond order by csid desc";

没有再出现这个错误,所以在写hql的时候要特别的注意!

猜你喜欢

转载自blog.csdn.net/m0_37852553/article/details/78234202