org.hibernate.MappingException: Named query not known: XXXX 解决办法
2014-04-02 15:42
323 查看
org.hibernate.MappingException: Named query not known: XXXx 解决办法
错误解决办法:
1:检查 <query name="XXXX"> 中的 XXXX 是否和程序中用到一致
session.getNamedQuery("XXXX");
2 :<query name="XXXX"> 所在 hbm.xml 是否已经在 hibernate.cfg.xml 中注册。
3:<query name="XXXX"> 的位置放错了,应该是放在和<class> 同一级。
这样的: </class>
<query name="XXXX">
错误解决办法:
1:检查 <query name="XXXX"> 中的 XXXX 是否和程序中用到一致
session.getNamedQuery("XXXX");
2 :<query name="XXXX"> 所在 hbm.xml 是否已经在 hibernate.cfg.xml 中注册。
3:<query name="XXXX"> 的位置放错了,应该是放在和<class> 同一级。
这样的: </class>
<query name="XXXX">
相关文章推荐
- 常见Hibernate报错处理:出现“org.hibernate.QueryException: could not resolve property”和 is not mapped和could not locate named parameter错误的解决
- org.hibernate.QueryException:ClassNotFoundException:org.hibernate.hql.ast.HqlToken错误之解决办法
- Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: table is not Mapped问题解决
- org.hibernate.InvalidMappingException: Could not parse mapping document from resource 处理办法
- org.hibernate.hql.internal.ast.QuerySyntaxException: USER is not mapped 报错解决
- hibernate:Named query not known: findXXXX or XXXX is not mapped
- Hibernate报错:org.hibernate.ObjectNotFoundException: No row with the given identifier exists 解决办法
- 用数据库连接池解决org.hibernate.exception.JDBCConnectionException:could not execute query
- java.io.NotSerializableException: org.hibernate.util.MarkerObject解决办法
- org.hibernate.ObjectNotFoundException异常的分析及其解决办法
- 用maven管理Spring项目出现org.hibernate.MappingException Unknown entity的问题解决办法
- org.hibernate.InvalidMappingException: Unable to read XML原因及解决办法
- org.hibernate.ObjectNotFoundException: No row with the given identifier exists解决办法
- org.hibernate.hql.ast.QuerySyntaxException:is not mapping
- 从数据库方面解决org.hibernate.exception.JDBCConnectionException:could not execute query
- org.hibernate.InvalidMappingException: Could not parse mapping document from resource 处理办法
- org.hibernate.QueryException: Space is not allowed after parameter prefix ':'解决
- myeclipse 使用weblogic10启动hibernate项目时出现ClassNotFoundException: org.hibernate.hql.ast.HqlToken异常的解决办法
- 配置hibernate:Caused by: org.hibernate.MappingException: persistent class not known: com.ht.domain.
- 用数据库连接池解决org.hibernate.exception.JDBCConnectionException:could not execute query