MyException - 我的异常网
当前位置:我的异常网» Java相关 » org.hibernate.hql.ast.QuerySyntaxException: TInv

org.hibernate.hql.ast.QuerySyntaxException: TInvProd is

www.MyException.Cn  网友分享于:2013-11-26  浏览:788次
hibernate的问题?
谁知道 怎么 改啊 什么错误
org.hibernate.hql.ast.QuerySyntaxException: TInvProd is not mapped [from TInvProd as s ]
at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:158)
at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:87)
at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:70)
at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:265)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3056)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2945)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:688)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:544)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
at com.anrui.pis.impsp.ShallDAO.getAllTInvProd(ShallDAO.java:62)
at com.anrui.pis.managers.impl.erwin.vv.main(vv.java:14)
Exception in thread "main" java.lang.NullPointerException
at com.anrui.pis.managers.impl.erwin.vv.main(vv.java:15)


------解决方案--------------------
TInvProd 这个类 并没有和相应的表建立映射关系吧

你的TInvProd.hbm.xml 文件呢

------解决方案--------------------
探讨
TInvProd 这个类 并没有和相应的表建立映射关系吧

你的TInvProd.hbm.xml 文件呢

------解决方案--------------------
TInvProd在hibernate的配置文件中找不到映射xml文件或class文件,也有可能在hibernate的配置文件中没有配置这个内容。

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有