"select u from Users u where u.username=? and password=?",
new Object[] { username , password });
数据库实例名是orcl。登录时报错,后台输出:
Hibernate: select users0_.USERID as USERID11_, users0_.USERNAME as USERNAME11_, users0_.PASSWORD as PASSWORD11_, users0_.NAME as NAME11_, users0_.REGISTERDATE as REGISTER5_11_, users0_.ZJLOGIN as ZJLOGIN11_ from orcl.USERS users0_ where users0_.USERNAME=? and users0_.PASSWORD=?
2010-05-10 21:12:02,593 ERROR [org.hibernate.util.JDBCExceptionReporter] -
实体类名和对应的表明都是Users 。我记得user是关键字,users不是关键字吧?