-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm trying to load some huge data from the database in a "initSetup" method of a modal, but the modal keeps charging and doesn't show with this error * AVERTISSEMENT [org.zkoss] Page [Page eSEQ] was destroyed because desktop was destroyed.It is usually caused by invalidating the native session directly. If it is required, please set Attributes.RENEWNATIVE_SESSION first.*
Also : java.lang.NoClassDefFoundError: org/zkoss/mesg/MCommon
I'm loading the data using this method :
@SuppressWarnings({ "unchecked" })
@Override
@Transactional
public List<T> findAll() {
StatelessSession session = ((Session) entityManager.getDelegate())
.getSessionFactory().openStatelessSession();
org.hibernate.Query query = session.createQuery("SELECT t FROM table t ORDER BY t.id");
query.setReadOnly(true);
query.setFetchSize(Integer.valueOf(1000));
query.setLockMode("z", LockMode.NONE);
ScrollableResults resultList = query.scroll(ScrollMode.FORWARD_ONLY);
entityManager.flush();
List<T> result = new ArrayList<T>();
while (resultList.next()) {
result.add((T) resultList.get()[0]);
}
session.close();
return result;
} Any help will be appreciated, thanks
Regarding the error:
java.lang.NoClassDefFoundError: org/zkoss/mesg/MCommon
it's obvious that zcommon.jar is missing in your classpath, please check.
ZK stores Desktop and Page in HttpSession
(not Hibernate StatelessSession
), you need to find out why a session is destroyed. It's usually not related to ZK.
Asked: 2017-07-03 13:44:55 +0800
Seen: 17 times
Last updated: Jul 07 '17
where to put @Transactional (Hibernate Spring)
Is ZK compatible with hibernate 4.0
show on image component blob image
Can't Open a modal : Stateless Session
How to configure quartz to use Hibernate in Zk app? [closed]
zk hibernate session per conversation