org.hibernate.hql.ast.QuerySyntaxException: Person is not mapped
2013-01-23 10:57
435 查看
org.hibernate.hql.ast.QuerySyntaxException: Person is not mapped [select o from Person o.....
Spring+struts+JPA
发生这个错误除了其他人所说hibernate配置之类的错误外(没有用到hibernate,使用JPA),也有可能是因为实体类Person没有使用@Entity来标注;
根据JPA规范,需要将Person类加上标注@Entity,通过这个注解,指明Person为实体类。
Spring+struts+JPA
发生这个错误除了其他人所说hibernate配置之类的错误外(没有用到hibernate,使用JPA),也有可能是因为实体类Person没有使用@Entity来标注;
根据JPA规范,需要将Person类加上标注@Entity,通过这个注解,指明Person为实体类。
相关文章推荐
- org.hibernate.hql.internal.ast.QuerySyntaxException: XXXXis not mapped [from XXXX]
- org.hibernate.hql.ast.QuerySyntaxException: XXX is not mapped [from XXX]
- Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Student is not mapped
- org.hibernate.hql.ast.QuerySyntaxException per is not mapped [from Per as p]
- hibernate错误:org.hibernate.hql.ast.QuerySyntaxException: emp is not mapped [from emp]
- org.hibernate.hql.internal.ast.QuerySyntaxException: users is not mapped
- Hibernate异常: org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User]
- SSH出错--hibernate--org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [from User]
- org.hibernate.hql.ast.QuerySyntaxException: xxx is not mapped [from xxx]
- org.hibernate.hql.ast.QuerySyntaxException: Category is not mapped [from Category]
- 异常收集-org.hibernate.hql.internal.ast.QuerySyntaxException: activityinfo is not mapped
- SSH报错:org.hibernate.hql.ast.QuerySyntaxException: User is not mapped [select o from User o where 1=1
- org.hibernate.hql.ast.QuerySyntaxException: tablename is not mapped ......
- org.hibernate.hql.internal.ast.QuerySyntaxException: Admin is not mapped [from Admin where username=
- org.hibernate.hql.internal.ast.QuerySyntaxException: ### is not mapped
- org.hibernate.hql.ast.QuerySyntaxException:is not mapped 异常总结
- apfuse2.0.2 nested exception is org.hibernate.hql.ast.QuerySyntaxException: Otacity is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: xxx is not mapped
- org.hibernate.hql.ast.QuerySyntaxException: is not mapped 异常处理
- 异常:org.hibernate.hql.ast.QuerySyntaxException: EmpModel is not mapped [from EmpModel where name = ?