| Guys,
 I am facing this issue when using setFirstResult/setMaxResults with either query or criteria objects...it gives with the error From Keyword not found..the query works fine if i dont use them
 
 Below is the Criteria i am creating to fetch the results...Would appreciate any help...Using hibernate 3.2.5 with oracle 10g...
 
 Code
 ------
 personList = session.createCriteria(Person.class).
 addOrder(Order.asc("firstName")).
 setFirstResult(first).
 setMaxResults(count).list();
 
 ERROR LOG
 ------------------
 Hibernate: select top ? this_.PERSONID as PERSONID0_, this_.FIRSTNAME as FIRSTNAME1_0_, this_.LASTNAME as LASTNAME1_0_, this_.MIDDLENAME as MIDDLENAME1_0_, this_.ADDRESS1 as ADDRESS5_1_0_, this_.CITY as CITY1_0_, this_.STATE as STATE1_0_, this_.ZIPCODE as ZIPCODE1_0_, this_.COUNTRY as COUNTRY1_0_, t
 his_.EMAIL as EMAIL1_0_, this_.BIRTHDATE as BIRTHDATE1_0_ from PERSON this_ order by this_.FIRSTNAME
 asc
 WARN  - JDBCExceptionReporter      - SQL Error: 923, SQLState: 42000
 ERROR - JDBCExceptionReporter      - ORA-00923: FROM keyword not found where expected
 
 Thanks in advance and Regards,
 
 Farhan.
 
 
 |