首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

org.hibernate.hql.ast.QuerySyntaxException错误

2012-07-16 
org.hibernate.hql.ast.QuerySyntaxException异常当出现以下异常信息时javax.servlet.ServletException: o

org.hibernate.hql.ast.QuerySyntaxException异常
当出现以下异常信息时
javax.servlet.ServletException: org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: : near line 1, column 33 [from com.dao.Book where bookName:=name]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected token: : near line 1, column 33 [from com.dao.Book where bookName:=name]
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

表示HQL语句写错了,如findByNamedParam("from Book where bookName:=name", "name", bname);应是=:而不是:=

热点排行