Я сталкиваюсь с исключением: org.hibernate.hql.ast.QuerySyntaxException: Student6 не отображается [из Student6 stud] мое имя таблицы - это Student6 в базе данных сервера sql, а имя класса pojo - Student.
public static void main(String[] args) {
Configuration configuration = new Configuration();
SessionFactory sessionFactory = configuration.configure().buildSessionFactory();
Session session = sessionFactory.openSession();
try {
String SQL_QUERY ="from Student6 stud";
Query query = session.createQuery(SQL_QUERY);
for(Iterator it=query.iterate();it.hasNext();) {
Object[] row = (Object[]) it.next();
System.out.println("STUDENT_ID: " + row[0]);
System.out.println("STUDENT_NAME: " + row[1]);
System.out.println("ADDRESS_STREET: " + row[2]);
System.out.println("ADDRESS_CITY: " + row[3]);
System.out.println("ADDRESS_STATE: " + row[4]);
System.out.println("ADDRESS_ZIPCODE: " + row[5]); }
} catch (HibernateException e) {
transaction.rollback();
e.printStackTrace();
} finally {
session.close();
}
}