Google App Engine - org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed

ε祈祈猫儿з 提交于 2019-12-01 17:05:16

Adding @Transactional to the method prevents the object manager from closing. However, I'm not sure why it closes without this.

I don't know why exactly, but it seems to have to do with query.getResultList() being lazy-loaded. Apparently the lazy-loading breaks down when you call remove(token).

As a work-around can you collect the ids/keys for the elements in an ArrayList first, and in a separate loop remove them from the datastore?

the solution that worked for me and a description of the bug i found here:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/945f6ca66c1c587e

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!