org.hibernate.hql.ast.QuerySyntaxException: unexpected token 的解决
2010-08-03 16:19
531 查看
今天使用hibernate,
String sql = "select count(obj.id) from " + className+" obj";出现org.hibernate.hql.ast.QuerySyntaxException: unexpected token异常,google 一阵子没效果。
后来把实体类所在的object包改成其他名字如ot,问题解决,莫非使用hibernate,实体类不能放在object包
String sql = "select count(obj.id) from " + className+" obj";出现org.hibernate.hql.ast.QuerySyntaxException: unexpected token异常,google 一阵子没效果。
后来把实体类所在的object包改成其他名字如ot,问题解决,莫非使用hibernate,实体类不能放在object包
相关文章推荐
- org.hibernate.hql.ast.QuerySyntaxException: unexpected token 异常解决
- org.hibernate.hql.ast.QuerySyntaxException: unexpected token: on near line 3解决方法
- Exception in thread "main" org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token:
- org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: * near line 1, column 8
- org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ( near line 1, column 16
- org.hibernate.hql.internal.ast.QuerySyntaxExceptionunexpected token: on near line 1
- org.hibernate.hql.ast.QuerySyntaxException: unexpected token: on near line 1解决方案
- org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: u near line 1, column 55 [fro
- 异常积累:org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token:
- org.hibernate.hql.ast.QuerySyntaxException: unexpected token: from near line 1, column 17 [select co
- org.hibernate.hql.ast.QuerySyntaxException: unexpected token: where near line
- 求帮助org.hibernate.hql.ast.QuerySyntaxException: unexpected token: id near line 1, column 35 [from com
- org.hibernate.hql.internal.ast.QuerySyntaxExceptionunexpected token: on near line 1
- org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: b near line 1, column 49...
- HQL子查询报错:org.hibernate.hql.ast.QuerySyntaxException: unexpected token...
- Hibernate error : org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree
- 每日一得-org.hibernate.hql.ast.QuerySyntaxException: Path expected for join!错误解决办法
- org.hibernate.hql.ast.QuerySyntaxException: Unable to locate appropriate constructor on class XXX解决
- org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree []
- Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: table is not Mapped问题解决