I have been implemented page nvigation mechanizm using Query:
Code:
Query q = sess.createQuery("from p in class Product");
q.setMaxResults(pageSize);
q.setFirstResult(numPage * pageSize);
return q.list();
It's working fine but recently when i have used Oracle database sometimes I 've got exception (java.sql.SQLException: Conversion to String failed). But if I used following code:
Code:
Query q = sess.createQuery("from p in class Product");
return q.list();
I didn't get any exceptions.
What do you think. What is the problem?