This is a small application in hibernate but i am getting exception please help me i am new to hibernate
this is my client application
import org.hibernate.cfg.*;
import org.hibernate.*;
import java.util.*;
class TestClient
{
public static void main(
String args[])throws Exception{
Configuration conf=new Configuration();
conf.configure();
SessionFactory factory=conf.buildSessionFactory();
Session ses=factory.openSession();
Transaction tx=ses.beginTransaction();
String s="select * from employee";
SQLQuery q=ses.createSQLQuery(s);
q.addEntity(EmpBean.class);
List l=q.list();
for(int i=0;i<l.size();i++)
{
EmpBean e=(EmpBean)l.get(i);
System.out.println("name=================================="+e.getFname());
}
tx.commit();
ses.close();
factory.close();
Exception is:
javac *.java
TestClient.java:13: cannot find symbol
symbol : class SQLQuery
location: class TestClient
SQLQuery q=ses.createSQLQuery(s);
^
cannot find symbol
symbol : method createSQLQuery(java.lang.String)
location: interface org.hibernate.Session
SQLQuery q=ses.createSQLQuery(s);
please help me