求助,用hibernate创建的表,怎么做登陆验证? 
我这老提示表名无效 
java.sql.SQLException: 对象名 'usertable' 无效。 
但是手动在数据库里却可以查到值,程序运行到ResultSet rs = st.executeQuery(sql)就抛异常
下面是查询方法: public boolean checkLogin(LoginForm lf) {
boolean res = false;
Connection con = new MyConnection().getCon();
if (con != null) { try {
Statement st = con.createStatement();
String sql = "select * from usertable where name='"
+ lf.getName() + "' and age='"
+ lf.getPwd() + "'";
System.out.println("查询id语句:"+sql);
ResultSet rs = st.executeQuery(sql);
if (rs.next()) {
System.out.println("有值,登陆成功");
res = true;
} else {
System.out.println("登陆失败");
res = false;
}
new MyConnection().closeCon();
} catch (SQLException e) {
e.printStackTrace();
}
}
return res;
}
 
在线等,急