2010-08-16 20:54:20,221 ERROR (KeywordMatcherWorker.java:155) [de.it2m.dpl.hitkeywordmacher.KeywordMatcherWorker, run] - java.lang.UnsupportedOperationException
at org.hibernate.impl.StatelessSessionImpl.setCacheMode(StatelessSessionImpl.java:465)
at org.hibernate.impl.AbstractQueryImpl.before(AbstractQueryImpl.java:913)
at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:67)
at de.it2m.dpl.hitkeywordmacher.KeywordMatcherWorker.run(KeywordMatcherWorker.java:86)
at java.lang.Thread.run(Thread.java:619)
code
Code:
StatelessSession session = sf.openStatelessSession();
Transaction tx = session.beginTransaction();
try {
Query qry = session.getNamedQuery("getAll");
qry.setMaxResults(maxResults);
qry.setFirstResult(offset);
final Iterator sc = qry.iterate();
while (sc.hasNext()) {
I am not setting cache