毕业设计-基于JAVAEE的B2B2C网上商城-中遇到的问题

1、映射出错

出错信息

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.springframework.orm.hibernate3.HibernateQueryException: customer is not mapped [from customer where username=? and password=?]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: customer is not mapped [from customer where username=? and password=?]
	org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:656)
	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)

检查:Customer.hbm.xml以及Customer.java文件都没有错误。在applicationContext.xml中也配置了Customer.hbm.xml以及Customer.java。最后查了一天,发现是查询语句中不应该使用表名而应该用映射文件名Customer

2、

type Status report

message No result defined for action onlinemall.customer.action.UserAction and result login

description The requested resource (No result defined for action onlinemall.customer.action.UserAction and result login) is not available.

即:找到了对应的Action但是返回的事login

原因:validate方法有问题,程序没有通过;符合条件进入拦截器,拦截器中返回的是action.login(此处有错)

         修改后仍然有错,检查发现MyFIlter拦截器使没有登录的页面跳转到登录页面,不应该在login中使用

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值