日期:2014-05-17  浏览次数:20768 次

新手请指教 谢谢了!!!
添加的时候没有报错 但是查询的时候报这个错误 

org.springframework.orm.hibernate3.HibernateQueryException: lxNews is not mapped [from lxNews]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: lxNews is not mapped [from lxNews]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:657)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:921)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:913)
at com.news.dao.impl.NewsDaoImpl.selectNewsCount(NewsDaoImpl.java:137)
at com.news.service.impl.NewsServicesImpl.selectNewsCount(NewsServicesImpl.java:61)
at com.news.service.impl.NewsServicesImpl$$FastClassByCGLIB$$9082df78.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)

------解决方案--------------------
lxNews is not mapped [from lxNews]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: lxNews is not mapped [from lxNews]