Can't Open a modal : Stateless Session

asked 2017-07-03 13:43:04 +0800

DevOps gravatar image DevOps

I'm trying to load some huge data from the database in a "AfterCompse" 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.setLockMode("z", LockMode.NONE);
    ScrollableResults resultList = query.scroll(ScrollMode.FORWARD_ONLY);

    List<T> result = new ArrayList<T>();
    while (resultList.next()) {
        result.add((T) resultList.get()[0]);
    return result;

Any help will be appreciated, thanks

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2017-07-03 13:43:04 +0800

Seen: 6 times

Last updated: Jul 03 '17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More