日期:2014-05-19  浏览次数:20710 次

SSH2错误:nested exception is org.hibernate.hql.ast.QuerySyntaxException是什么意思
编了一个SSH2的例子,客户登录验证。运行时报错,请问是哪里错了,应该怎么改?不胜感激。

org.springframework.orm.hibernate3.HibernateQueryException: customer_table is not mapped [from customer_table c where c.username = ? and c.password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: customer_table is not mapped [from customer_table c where c.username = ? and c.password=?]

完整错误信息:
Stacktraces

org.springframework.orm.hibernate3.HibernateQueryException: customer_table is not mapped [from customer_table c where c.username = ? and c.password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: customer_table is not mapped [from customer_table c where c.username = ? and c.password=?]
    org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:660)
    org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
    org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
    org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
    com.kevin.dao.impl.CustomerDaoHibernate.findByNameAndPass(CustomerDaoHibernate.java:57)
    com.kevin.service.impl.CheckLoginServiceImpl.checkLogin(CheckLoginServiceImpl.java:22)
    com.kevin.action.LoginAction.execute(LoginAction.java:40)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
    com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
    com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
    com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
    com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
    org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
    com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(M