Gae exception: Object Manager has been closed

Source: Internet
Author: User

Root cause:
Org. datanucleus. Exceptions. nucleus ususerexception: Object Manager has been closed

Are you using Google App Engine for Java and JDO?
If you ask for a list of something you might have to call the method size (). (studip I know)

Thecode below wocould throw org. datanucleus. Exceptions. nucleus ususerexception: "Object Manager has been closed" if we removed the call to size ()

public list getallcustomers ()
{< br> List customers = new arraylist () ;
persistencemanager PM = pmfinstance. getpersistencemanager ();
string query = "select from" + customer. class. getname ();
MERs = (list pm.newquery(query0000.exe cute ();
MERs. size ();
PM. close ();
return customers;
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.