Root cause:
org.datanucleus.exceptions.NucleusUserException: 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 would throw org.datanucleus.exceptions.NucleusUserException:"Object Manager has been closed" if we removed the call to size()

public List<Customer>getAllCustomers()
{
    List<Customer> customers = new ArrayList();
    PersistenceManager pm = pmfInstance.getPersistenceManager();
    String query = "select from " + Customer.class.getName();
    customers = (List<Customer> pm.newQuery(query).execute();
    customers.size();
    pm.close();
    return customers;
}

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2021-04-04
  • 2021-09-19
  • 2021-09-27
  • 2022-03-05
  • 2021-12-21
  • 2021-06-02
猜你喜欢
  • 2022-12-23
  • 2021-10-30
  • 2021-10-19
  • 2021-05-11
  • 2021-05-31
  • 2021-09-13
  • 2022-12-23
相关资源
相似解决方案